成功解决TypeError int object is not iterable

成功解决TypeError: 'int' object is not iterable

目录

解决问题

解决思路

解决方法


解决问题

TypeError: 'int' object is not iterable

解决思路

TypeError: 'int' object is not iterable

解决方法

查看要迭代的对象,不能为单个整型数,可以直接转为列表,

将num改为[num]

哈哈,大功告成!

原创文章 1699 获赞 8069 访问量 1419万+

猜你喜欢

转载自blog.csdn.net/qq_41185868/article/details/106127522