Have for example three lists:
list4 = (start_time, 'Test type1', 'Result1', 'Units1')
list5 = (start_time, 'Test type2', 'Result2', 'Units2')
list6 = (start_time, 'Test type3', 'Result3', 'Units3')
And then - they used in:
report = open('111.csv', 'w')
writer = csv.writer(report, delimiter=';')
#writer = csv.writer(sys.stdout, delimiter=';')
for row in zip(list4, list5, list6):
writer.writerow(row)
And this leads to this result:
$ cat 111.csv
2014-10-01 16:53:29;2014-10-01 16:53:29;2014-10-01 16:53:29
Test type1;Test type2;Test type3
Result1;Result2;Result3
Units1;Units2;Units3
But _ want - it create file like:
2014-10-01 16:51:21;Test type1;Result1;Units1;
2014-10-01 16:51:21;Test type2;Result2;Units2;
2014-10-01 16:51:21;Test type3;Result3;Units3;
zip(list4, list5, list6)just(list4, list5, list6)without zip?