說明:
比如,有個長字符串,Put several strings within parentheses to have them joined together.但是我在寫腳本的時候,
想要放在多行來寫,如何進行切割
操作過程:
1.通過多個字符串的拼接,並且放入到括號中
>>> text = ('Put several strings within parentheses' "to have them joined" 'together.') >>> text 'Put several strings within parenthesesto have them joinedtogether.'
#注意:一定把所有字符串放入到括號中
>>> text = ('put' +
'ABc')
>>> text
'putABc'
備注:將多個字符串放入到括號中,然后還是使用之前的字符串拼接方式完成拼接。
文檔創建時間:2018年11月23日11:16:15