import csv outfile = file(\'test.csv\', \'w\') writer = csv.writer(outfile, delimiter=\',\', quoting=csv.QUOTE_MINIMAL) writer.writerow([\'hi\',\'dude\']) writer.wri
You have to add attribute newline="\n" to open function like this:
with open('file.csv','w',newline="\n") as out: csv_out = csv.writer(out, delimiter =';')