import csv
with open('fujun.csv',mode='w') as file:
name={'名字' ,'密码'}
writer=csv.DictWriter
(file,fieldnames=name)
writer. writeheader()
data={'名字':'fujun','密码':'838383'}
writer.writerow(data)
import csv
with open('fujun.csv',mode='w') as file:
name={'名字' ,'密码'}
writer=csv.DictWriter
(file,fieldnames=name)
writer. writeheader()
data={'名字':'fujun','密码':'838383'}
writer.writerow(data)