0
在Python3.2我試圖做一個列表:Python的方法列表
>> ls = 1, 2, 3
>> ls
(1, 2, 3)
>> ls.append(4)
而且利用這最後的命令,我收到以下錯誤:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'tuple' object has no attribute 'append'
這是爲什麼?我該如何解決它? 感謝您的時間
非常感謝!這是一個很大的幫助。 –