问答详情
源自:3-6 Python中raw字符串与多行字符串

为什么加上\运行不了

print(r'''\"To be, or not to be \": that is the question.

Whether it's nobler in the mind to suffer.''')


提问者:零樱 2021-07-27 17:29

个回答

  • 慕妹1054277
    2021-07-27 23:24:22

    a= r'''"To be, or not to be ": that is the question.

    Whether it's nobler in the mind of suffer."'''

    print (a)

    其实用了raw就没有必要放 \ 了