問題:
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