r'''.....'' 怎么換行啊,謝謝
'\"To be, or not to be\": that is the question.\nWhether it\'s nobler in the mind to suffer.'
print(r'''"To be, or not to be"''': that is the question.\n r'''Whether it\'s nobler in the mind to suffer.''')?怎么換行啊,謝謝
'\"To be, or not to be\": that is the question.\nWhether it\'s nobler in the mind to suffer.'
print(r'''"To be, or not to be"''': that is the question.\n r'''Whether it\'s nobler in the mind to suffer.''')?怎么換行啊,謝謝
2020-11-29
舉報
2021-06-10
cmd命令行怎么在'''...'''里面換行寫后半段的。。
2021-03-17
2021-01-23
所以。。怎么換行呢??
2021-01-03
print(r''''To be,or not to be':that is the question.
Whether it's nobler in the mind to suffer.''')
2020-12-21
print('\"To be, or not to be\": that is the question.\n'r'''Whether it\'s nobler in the mind to suffer.''')
這樣他就會在\n后面變成換行了。
2020-11-30
小伙子,代碼這樣子寫哦,注意換行哦
還有,如果一個字符串包含很多需要轉(zhuǎn)義的字符,對每一個字符都進(jìn)行轉(zhuǎn)義會很麻煩。為了避免這種情況,我們可以在字符串前面加個前綴
r
,表示這是一個?raw?字符串,里面的字符就不需要轉(zhuǎn)義了。