關于想把后面單引號定義為字符的問題
?print(r''''\"To be,or not to be\":that is the question .\nWhether it\'s nobler in the mind to xuffer.'''')
我前面是四個單引號,后面也是四個單引號。我想把前面一個單引號和后面一個單引號定義為字符串,為啥子報錯了。問豆包他說后面單引號多了一個
?print(r''''\"To be,or not to be\":that is the question .\nWhether it\'s nobler in the mind to xuffer.'''')
我前面是四個單引號,后面也是四個單引號。我想把前面一個單引號和后面一個單引號定義為字符串,為啥子報錯了。問豆包他說后面單引號多了一個
2025-02-24
舉報
2025-02-24
三個單引號是閱讀終止了,后面些啥都是錯的,所以字符串命名就需要避免三個單引號