Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# write list of list to csv having ascii encoding issue
# account_list = [['first_name', 'last_name', ']...]
with open('output.csv', 'wb') as f:
writer = csv.writer(f)
for item in account_list:
writer.writerow([s.encode('utf8') for s in item])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment