import csv
data = ["Apparels,Clothings,Materials,Bazaar,Saree,Salwars"]
f = open('data.csv', 'w')
w = csv.writer(f, delimiter = ',')
w.writerows([x.split(',') for x in data])
f.close()
I used the following code to write a list into a csv file. The problem I'm having is that, the new csv file (EXCEL.Doc) is spaced out as in the attachments.
I would like the new file to be like the old one not spaced out.