TypeError: 'list' object cannot be interpreted as an integer Python常见错误

想要通过索引来迭代一个list或者string的元素,

这需要调用 range() 函数。要记得返回len 值而不是返回这个列表。