如何创建新的CSV文件

时间:2016-05-13 10:21:36

标签: python csv

我不确定如何创建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"])

0 个答案:

没有答案
相关问题