我做了以下內容:打印()不是串聯成一個字符串
print('Sent email', i+1)
但是,它不打印Sent email 1
如我期望的,它打印而不是一個列表:
('Sent email', 1)
爲什麼它沒有將兩個參數連接成單個字符串?
編輯:我使用Python 3.3.2在Windows
>>> import sys;print(sys.version)
3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)]
之前我沒有提到這一點,但我使用Python 3.3.2。另外'print()'語法顯然也在2.7 –
py3中有效?你確定?什麼'import sys; print(sys.version)'說? – georg
@ thg435我編輯了我的問題以包含您的請求的結果。 –