问题:
What does error TypeError: 'NoneType' object is not iterable
mean?错误TypeError: 'NoneType' object is not iterable
是什么意思?
I am getting it on this Python code:我在这个 Python 代码上得到了它:
def write_file(data, filename): # creates file and writes list to it
with open(filename, 'wb') as outfile:
writer = csv.writer(outfile)
for row in data: # ABOVE ERROR IS THROWN HERE
writer.writerow(row)
解决方案:
参考一: https://en.stackoom.com/question/GJHh参考二: https://stackoom.com/question/GJHh