Python学习中常见错误2 AttributeError: 'tuple' object has no attribute 'append'

代码如下:

错误原因:元组不可改变,不可像列表一样进行追加append(),移除remove()操作

解决方案:转换为列表list()

猜你喜欢

转载自blog.csdn.net/walter7/article/details/83833766
今日推荐