Then I try to use the .reverse () command on the list and I end up getting it as a NoneType. I try to use reversed (), but all it does is say "<listreverseiterator object at 0xSomeRandomHex>": from qSort import qSort #refer to my first Pastebin qSort = qSort ( [5,42,66,1,24,5234,62]) print qSort #this prints the sorted list print type (qSort) # ...
10 timer siden · File "main.py, line 9, in <module> for tweet in tweets.data: TypeError: 'NoneType' object is not iterable im using python 3.6.9 and tweepy 4.4.0 my code is below
I prefer:for item in data or []:Although it is sorta Perlish, it is compact. If data is iterable, it will be iterated. If not, zero iterations will occur.