Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#save new_list, a list of dictionaries to a csv file:
keys = tmp_list[0].keys()
with open("event_list.csv", "w") as f:
dict_writer = DictWriter(f, keys, delimiter=",")
dict_writer.writeheader()
for value in tmp_list:
dict_writer.writerow(value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.