TypeError: 'list' object cannot be interpreted as an integer Python常见错误
想要通过索引来迭代一个list或者string的元素, 这需要调用 range() 函数。要记得返回len 值而不是返回这个列表。 ...
想要通过索引来迭代一个list或者string的元素, 这需要调用 range() 函数。要记得返回len 值而不是返回这个列表。 ...
1.string是一种不可变的数据类型 2.尝试使用 range()创建整数列 有时你想要得到一个有序的整数列表,所以 range() 看上去是生成此列表的不错方式。 需要 ...
1.忘记在 if , elif , else , for , while , class ,def 声明末尾添加 “:” 2.使用 = 而不是 ==,= 是赋值操作符而 == 是等于比较操 ...
忘记为方法的第一个参数添加self参数 --------------------------------------------------------------- ...
方法名拼写错误 检查方法名拼写,如有错误改正即可 特别注意m和n ...