>>> name='萧峰'
>>> print(name)
萧峰
>>> name="独孤求败"
>>> print(name)
独孤求败
>>>
 >>> p='C:\Users\lenovo\Desktop\python'
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
>>> p='C:\\Users\\lenovo\\Desktop\\python'
>>> p
'C:\\Users\\lenovo\\Desktop\\python'
>>> p=r'C:\Users\lenovo\Desktop\python'
>>> p
'C:\\Users\\lenovo\\Desktop\\python'
>>> p=r'C:\Users\lenovo\Desktop\python\'
SyntaxError: EOL while scanning string literal
>>> p=r'C:\Users\lenovo\Desktop\python'+'\\'
>>> p
'C:\\Users\\lenovo\\Desktop\\python\\'
>>> p=r'C:\Users\lenovo\Desktop\python'+'\'
SyntaxError: EOL while scanning string literal
>>> p='C:\\Users\\lenovo\\Desktop\\python\\'
>>> p
'C:\\Users\\lenovo\\Desktop\\python\\'
>>> print(p)
C:\Users\lenovo\Desktop\python\
>>> poem='''滚滚长江东逝水
浪花涛尽英雄
'''
>>> poem
'滚滚长江东逝水\n浪花涛尽英雄\n'
>>> print(poem)
滚滚长江东逝水
浪花涛尽英雄 >>> poem="""青山依旧在
几度夕阳红"""
>>> poem
'青山依旧在\n几度夕阳红'
>>> print(poem)
青山依旧在
几度夕阳红
>>>
04-29 23:13