python中我print r'\'错在哪里?
$pythonPython2.7.1(r271:86832,Apr162011,23:27:12)[GCC3.4.520051201(RedHat3.4.5-2)]onl...
$ python
Python 2.7.1 (r271:86832, Apr 16 2011, 23:27:12)
[GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print r'\'
File "<stdin>", line 1
print r'\'
^
SyntaxError: EOL while scanning string literal
就打印一个"\"符号,求错误原因,不用说解决方法~ 展开
Python 2.7.1 (r271:86832, Apr 16 2011, 23:27:12)
[GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print r'\'
File "<stdin>", line 1
print r'\'
^
SyntaxError: EOL while scanning string literal
就打印一个"\"符号,求错误原因,不用说解决方法~ 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询