csv library python convert dict to csv
import csv
my_dict = {'1': 'aaa', '2': 'bbb', '3': 'ccc'}
with open('test.csv', 'w') as f:
for key in my_dict.keys():
f.write("%s,%sn"%(key,my_dict[key]))
csv library python convert dict to csv
import csv
my_dict = {'1': 'aaa', '2': 'bbb', '3': 'ccc'}
with open('test.csv', 'w') as f:
for key in my_dict.keys():
f.write("%s,%sn"%(key,my_dict[key]))
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us