标签:object obj mod += type port 报错 recent error:
>>> s = (1,2,3,[2,3])
>>> s
(1, 2, 3, [2, 3])
>>> s[3] + [5,6]
[2, 3, 5, 6]
>>> s[3] += [5,6]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: ‘tuple‘ object does not support item assignment
>>> s
(1, 2, 3, [2, 3, 5, 6])
标签:object obj mod += type port 报错 recent error:
原文地址:https://www.cnblogs.com/zengsf/p/9532228.html