name=['lucy','jacky','eric','man','san']place=['chongqing','guangzhou','beijing','shanghai','shenzhen']with open('Agoly.csv','w') as file: file.write('name,place\n') for n,p in zip(name,place): file.write("{},{}\n".format(n,p))
本文共 290 字,大约阅读时间需要 1 分钟。
name=['lucy','jacky','eric','man','san']place=['chongqing','guangzhou','beijing','shanghai','shenzhen']with open('Agoly.csv','w') as file: file.write('name,place\n') for n,p in zip(name,place): file.write("{},{}\n".format(n,p))
转载于:https://www.cnblogs.com/qmfsun/p/7731577.html