当前位置:   article > 正文

Python TypeError: argument of type ‘NoneType‘ is not iterable 报错解决_typeerror: argument of type 'nonetype' is not iter

typeerror: argument of type 'nonetype' is not iterable

在python上使用

if a=b:
elif a=c:
  • 1
  • 2

等判断语句的时候,如果没有加入else:的话,就会返回None

else:
  • 1

解决办法就是判断语句一定要全面。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/一键难忘520/article/detail/865201
推荐阅读
相关标签
  

闽ICP备14008679号