python报错:TypeError: tuple indices must be integers or slices, not str

TypeError: tuple indices must be integers or slices, not str

翻译过来:

类型错误:元组索引必须是整数或切片,而不是字符串。


解决方案:

将字符串换成整数

你可能感兴趣的:(python报错:TypeError: tuple indices must be integers or slices, not str)