请把下面的字符串用r'''...'''
的形式改写,并用print打印出来:
'\"To be, or not to be\": that is the question.\nWhether it\'s nobler in the mind to suffer.'
-
?不会了怎么办
-
首先根据换行符\n把字符串拆成多行,然后,添加 r 后去掉转义字符\
参考代码:
print r'''"To be, or not to be": that is the question. Whether it's nobler in the mind to suffer.'''