Skip to content

Instantly share code, notes, and snippets.

@g33klord
Created April 12, 2016 07:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save g33klord/b9b0cf31a7815520909288361436b8d9 to your computer and use it in GitHub Desktop.
Save g33klord/b9b0cf31a7815520909288361436b8d9 to your computer and use it in GitHub Desktop.
# write list of list to csv having ascii encoding issue
# account_list = [['first_name', 'last_name', 'email@example.com]...]
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