I am currently trying to organize data collected by a web scraper into a .csv file. The data is collected in a list and then written as csv.
My problem is that the program is writing the data into a single row in the file.
How can I tell the program to start a new row after for example every fifth entry?
Here is what my code looks like right now:
import csv
csvFile = open('practive.csv', 'w+')
try:
writer = csv.writer(csvFile, delimiter=',')
writer.writerow(('kaufpreis', 'ort', 'wohnfläche','zimmer', 'company'))
writer.writerows([dataliste])
finally:
csvFile.close()