Create a backslash-escaped version of a string?

boblatest boblatest at
Mon Feb 8 16:50:55 CET 2010

On Feb 8, 12:28 pm, Chris Rebert <c... at> wrote:
> print a.encode("string-escape")

How could I miss that? I was on that doc page already. Should have
typed "/escape" in the browser ;-)


More information about the Python-list mailing list