hi I have some problem.
import csv
test = ['a','b','c','d','e']
for t in test:
with open('names.csv', 'a') as csvfile:
fieldnames = ['acol', 'bcol', 'ccol']
writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
writer.writeheader()
writer.writerow({'acol': t, 'bcol': t, 'ccol': t})
'names.csv' result
acol bcol ccol
a a a
acol bcol ccol
b b b
acol bcol ccol
c c c
acol bcol ccol
d d d
acol bcol ccol
e e e''
there is whiteline and colume repeat i want result without white rows and without colume repeat