On Jan 22, 2008 1:38 PM, hrochonwo <hrochonwo at googlemail.com> wrote: > Hi, > > I want to print string without "decoding" escaped characters to > newline etc. > like print "a\nb" -> a\nb > is there a simple way to do it in python or should i somehow use > string.replace(..) function ? >>> print 'a\nb'.encode('string_escape') a\nb -- Jerry