Actually NoneType object is itself a type for None object just similar to int, float etc.
When we try to iterate the same using for loop , it throws the same error ( above mentioned)-
var=None
print(type(None))
for i in var:
print(i)
The best way to fix the same issue is avoiding the NoneType object in any iteration. we can use any iterable object like list, dict,str etc. if we are using int , float then we can use range with it.
For more detail on this and similar article -
Typeerror nonetype object is not iterable : Complete Solution
typeerror float object is not iterable : Step by Step Solution
Typeerror int object is not iterable : Root cause and Fix
Thanks Abhishek