亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

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

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

為什么要把轉義的字符刪除掉呢?

為什么print(''''\"To be, or not to be\": that is the question.\nWhether it\'s nobler in the mind to suffer.'''')就不行呢

正在回答

4 回答

這個是讓你改寫,題目中給的就是一串編碼,不是讓你打出來這句話,換一種形式表達


0 回復 有任何疑惑可以回復我~

這道題意思是如果一個句子存在很多轉義字符,在每個前面加\太麻煩,想讓你用r輸出:“To be...”:
Whether...,句子

0 回復 有任何疑惑可以回復我~

避免引起歧義,就是在符號前加斜杠

0 回復 有任何疑惑可以回復我~

簡單來說就是'''可以把這些特殊字符轉義。所以你可以按照正常方式來寫。

1 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
初識Python
  • 參與學習       758390    人
  • 解答問題       8967    個

學python入門視頻教程,讓你快速入門并能編寫簡單的Python程序

進入課程

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

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號