I want to output some of my data to a csv file so I can open it in excel. However, I can't even get my simple example to work. This is what I have:
import csv
with open('test.csv','wb') as csvfile:
writer = csv.writer(csvfile, delimiter='\t')
writer.writerow(['hi'] + ['how'] + ['goes'] + ['it'])
I want my words to be separated with tabs so that when I open the file in excel, each word becomes a new column.