以CSV文件格式导出Python

2024-03-29 06:01:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试以CsV格式导出一些内容…但无法完成。你知道吗

下面是我在python中的任意想法。你知道吗

script , file = argv
emails = open(file,"r") #opens the file 
results = csv.writer(open("Results.txt" , "w")) #Creates a new file to show results.

resultsList = []

here is the complete data and all


for results in resulsList:
results.writeline(result)

results.close()
emails.close()

现在…我需要保存所有存储在结果.txtCSV格式。你知道吗

请对此提供您的反馈。 谢谢。你知道吗


Tags: csvthe内容close格式scriptopenresults