import csv with open(\'thefile.csv\', \'rb\') as f: data = list(csv.reader(f)) import collections counter = collections.defaultdict(int) for row in data:
with open(destPath+'\\'+csvXML, 'a+') as csvFile: writer = csv.writer(csvFile, delimiter=';', lineterminator='\r') writer.writerows(xmlList)
The "lineterminator='\r'" permit to pass to next row, without empty row between two.