我希望以向csv文件写入新的一行内容(包括换行符)来结束for循环的每次迭代。我有这个:
# Set up an output csv file with column headers with open('outfile.csv','w') as f: f.write("title; post") f.write("\n")
这似乎不会写入实际的\n (换行符)文件。进一步:
# Concatenate into a row to write to the output csv file