天天看點

成功解決TypeError int object is not iterable

解決問題

TypeError: 'int' object is not iterable

解決思路

解決方法

檢視要疊代的對象,不能為單個整型數,可以直接轉為清單,

将num改為[num]

哈哈,大功告成!