Instruction
Great work!
The good news is that using
data_to_write = ...
with open('filename.csv', mode='w', newline='') as csv_file:
csv_writer = csv.writer(csv_file, dialect='excel-tab')
csv_writer.writerows(data_to_write)
Again, all we need to do is add the dialect parameter when invoking csv.writer() or csv.DictWriter().
Exercise
Write the data from the template into a CSV file named houses.csv. Add a header row to the first line. Use the unix CSV dialect.
Stuck? Here's a hint!
To write the header row, use: csv_writer.writeheader().



