> There's probably a more general method covering all the escape > sequences, but for just \n: > > your_string = your_string.replace("\\n", "\n") py> s = "hello\\r\\n" py> s 'hello\\r\\n' py> s.decode("string_escape") 'hello\r\n' py>