TypeError: ‘NoneType’ object is not iterable in Python

Total
0
Shares

What does TypeError: 'NoneType' object is not iterable mean? Example:

for row in data:  # Gives TypeError!
    print(row)

Solution

It means the value of data is None.

Source: StackOverflow.com

Leave a Reply

Your email address will not be published. Required fields are marked *