On Fri, Jan 11, 2013 at 7:33 PM, Prasad, Ramit <ramit.pra...@jpmorgan.com> wrote: > > Why not just use r'C:\Python27\\'? Might be too confusing for > a beginner to remember, I suppose.
Off the top of my heard I can think of 3 raw-escape uses of backslash in a raw string literal: placing an even number of backslashes at the end of the literal (an odd number is a syntax error), including the quote character, and raw line continuation (includes the LF): >>> list(r'\\') ['\\', '\\'] >>> list(r'\'') ['\\', "'"] >>> list(r"\"") ['\\', '"'] >>> s = r'\ ... ' >>> list(s) ['\\', '\n'] _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor