[Tutor] Question about the raw string
JiangShan
sampanriver at hotmail.com
Wed Nov 28 02:01:12 CET 2012
Hi everyone,
I am studying the python 3 and I am confused about the raw string. Why does the python interpreter do not escape the single backslash before the quotes even I add a "r" before the string. The following is an example:
>>> print(r"\")
SyntaxError: EOL while scanning string literal
>>> print(r"\\")
\\
>>>
Jiang Shan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20121128/d9dc55ca/attachment.html>
More information about the Tutor
mailing list