python常见错误 TypeError: ‘NoneType’ object is not iterable

  • Post author:
  • Post category:python

TypeError: ‘NoneType’ object is not iterable

1. 将None赋给多个值时,会出现提示:TypeError: ‘NoneType’ object is not iterable

2. 函数返回值一定要考虑到条件分支的覆盖

3. 在没有return语句时,python默认会返回None(return返回数据为空)


版权声明:本文为K_Lily原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。