TypeError: 'int' object is not iterable

版权声明:如需转载请评论告知并标明出处 https://blog.csdn.net/ShuqiaoS/article/details/82789159

Python写循环程序的时候遇到 TypeError: ‘int’ object is not iterable,原因是循环中使用的应该是一组数,将

for i in len(A)

改成

for i in range(len(A))

即可

猜你喜欢

转载自blog.csdn.net/ShuqiaoS/article/details/82789159