I am writing a program to sort a list fo input strings (song names).
Those songnames contains latex chars like $\\lambda$, which i want to
get sorted like \'lambda\' instead, s
This is the expected behaviour: as it is displaying the string stored in the list, and the double slashes means escaped slash. If you want to see the actual string, you should simply print that string, not the list. Try to append this line to your program: