第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

這個多行r,怎么添加換行符呢,除了按鍵盤回車。

print(r'''"To be, or not to be": that is the question.Whether it's nobler in the mind to suffer.''')


正在回答

1 回答

加個\n

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

高飛的魚 提問者

在Idle輸入: >>> print(r'''"To be, or not to be": that is the question.n\Whether it's nobler in the mind to suffer.''') 結(jié)果: "To be, or not to be": that is the question.n\Whether it's nobler in the mind to suffer. 所以我覺得,r字符不支持\n,只支持手動Enter換行。
2022-01-12 回復(fù) 有任何疑惑可以回復(fù)我~
#2

weixin_慕數(shù)據(jù)7090326

'''abc'''就是用來括多行字符串的 添加換行符就成了一行,用'abc'
2022-01-12 回復(fù) 有任何疑惑可以回復(fù)我~
#3

weixin_慕數(shù)據(jù)7090326 回復(fù) 高飛的魚 提問者

對,raw字符串里的\就是\,不表示命令
2022-01-12 回復(fù) 有任何疑惑可以回復(fù)我~
#4

高飛的魚 提問者 回復(fù) weixin_慕數(shù)據(jù)7090326

可以把代碼發(fā)給我嘛,我這里還是不行。 "To be, or not to be": that is the question.'abc'Whether it's nobler in the mind to suffer.
2022-01-12 回復(fù) 有任何疑惑可以回復(fù)我~
#5

weixin_慕數(shù)據(jù)7090326 回復(fù) 高飛的魚 提問者

不是這個意思,在r''' '''中就得用回車換行
2022-01-12 回復(fù) 有任何疑惑可以回復(fù)我~
#6

高飛的魚 提問者 回復(fù) weixin_慕數(shù)據(jù)7090326

哦哦,明白啦,感謝~
2022-01-12 回復(fù) 有任何疑惑可以回復(fù)我~
#7

weixin_慕數(shù)據(jù)7090326 回復(fù) 高飛的魚 提問者

你不加r的話可以用\n來換行
2022-01-12 回復(fù) 有任何疑惑可以回復(fù)我~
查看4條回復(fù)

舉報

0/150
提交
取消

這個多行r,怎么添加換行符呢,除了按鍵盤回車。

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號