for k, v in iterator: TypeError: 'NoneType' object is not iterable code example
Example: TypeError: 'NoneType' object is not iterable
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)