2019-09-03 Python循环错误
2019-09-29 本文已影响0人
Shalom小白
for i in range(len(a)):
出现错误:
TypeError: object of type 'NoneType' has no len()
for i, j in enumerate(a):
出现错误:
TypeError: 'NoneType' object is not iterable
这表示列表a中的某个值为None,需要检查列表a中的值。