我有list [],我在其中添加数据并使用它来写入文件:
def writefiles(alldata, filename):
with open ("./"+ filename, "w") as csvfile:
csvfile = csv.writer(csvfile, delimiter=",")
csvfile.writerow("")
for i in range(0, len(alldata)):
csvfile.writerow(alldata[i])
writefiles(alldata, "Data.csv")
我该怎么做?
答案 0 :(得分:0)
您可以使用return <UnorderedList><li>...</li><li>...</li></UnorderedList>;
将alldata
转换为所需的格式:
itertools.groupby