2019-09-03 Python循环错误

作者: Shalom小白 | 来源:发表于2019-09-29 08:33 被阅读0次

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中的值。

相关文章

网友评论

    本文标题:2019-09-03 Python循环错误

    本文链接:https://www.haomeiwen.com/subject/edjkyctx.html