成功解决TypeError: tuple indices must be integers or slices, not tuple

问题描述:

元组的索引必须是整数或者切片,不能是元组


原因分析:

元组的访问方式出错


解决方案:

详情查看:Python基础—列表、元组、集合、字典


问题拓展:

问题格式类似:XXX indices must be integers or slices, not XXX时,一般都是访问方式出现错误

猜你喜欢

转载自blog.csdn.net/weixin_43283397/article/details/109638577