If I get an input string from a user or file like this: "a\b\c" How do I convert it to this: "a\\b\\c" Desired behavior: >>> s = "a\b\c" >>> t = doit(s) # ??? >>> t "a\\b\\c" Thanks, Gene