Resolved TypeError int object is not iterable
Article directory
Error report
I have encountered this pit in my work before, and record the problem and solution. It may not be applicable to all situations, but it can be used for your reference.
The problem description is as follows:
TypeError int object is not iterable
Solution
View the object to be iterated, it cannot be a single integer, it can be directly converted to a list,
Change num to [num]
PS
If you have any questions, just leave a message in the comment area