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
But for some reason, when i append the lambda sign or \her it converts it to \\her or $\\lambda$...
No it doesn't. What you're seeing is the representation, which always doubles solo backslashes for clarity. If you print the actual strings instead you'll see that they're fine.