I have been trying to put list in to csv file but it's not taking the whole word as input but as a letter and inserting every letter in separate cell
import csv
data = {}
with open('test.csv','w',newline='') as fp:
a = csv.writer(fp,delimiter=',')
data = ['sales','tax']
a.writerows(data)
The output is:
s a l e s t a x
with each letter in separate cell
I need output like:
Sales Tax