1 2 3 4 5 6 7 8 9 10 11 12
| import csv with open('data.csv', 'w', encoding='utf-8') as csvf: writer = csv.writer(csvf.delimiter=',') writer.writerow(['title','comment', 'good', 'bad']) with open('data.csv', 'a', encoding='utf-8') as csvf: writer = csv.writer(csvf.delimiter=',') writer.writerow(['title','comment', 'good', 'bad'])
|