Python TypeError: argument of type 'NoneType' is not iterable

上次遇到了一個問題用if a in b:的時候報錯TypeError: argument of type ‘NoneType’ is not iterable,很久都沒找出問題所在,最後通過百度和Google搜索,才知道當一個函數沒有return語句的時候,Python默認返回None,我這裏把函數中的return刪了之後,忘記把主程序中的賦值操作刪除,再下一次迭代的時候,command_py就變
相關文章
相關標籤/搜索