我建议:
my_list = ['2017-05-31,20:00:00,71.1,73,', '2017-05-31,20:05:00,71.1,72.7,', '2017-05-31,20:10:00,71.1,72.5,', '2017-05-31,20:15:00,71.1,72.4,']
# create and open a file for writing
with open("my_file.csv", "w") as fout:
# iterate through your list
for element in my_list:
# write your element in your file plus a \n to trigger a new line
fout.write(element+"\n")
你去吧!
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句