我不确定如何创建csv文件,然后我还想学习如何在其上保存数据。我有想要在python中输入的变量,我想将它们转移到excel。如果有人可以帮我解决这个问题,我将非常感激!
import csv
def nasif():
myfile= open("MARIA.csv","wb")
wr=csv.writer(myfile,quoting=csv.QUOTE_ALL)
mylist=["Name","address","telephone"]
wr.writerow(mylist)
def maria():
c = csv.writer(open("MARIA.csv","rb"))
c.writerow(["Name","address","telephone"])