2021-03-26
阅读量:
503
python报错:TypeError: ' tuple' object does not support item assi gnment
问:
python报错:TypeError: ' tuple' object does not support item assi gnment
答:
这是因为tp5定义是一个元祖,tp5[1]=5 是对元祖内元素进行赋值操作,而元祖的特点是其元素不可变,因此出现此报错。






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论