I have a list of lists as below. a = [[1,2,3], [2,3,4], [3,4,5]]
I also have a separate list of names names = ['Ann', 'john', 'smith']
Now I want to write this into a csv file as below
1st row: Ann,1,2,3
2nd row: john,2,3,4
3rd row: smith,3,4,5
I am currently using;
with open(output_file, 'w') as f:
writer = csv.writer(f)
writer.writerows(a)
However, it does not do the job I want as it always starts from the first column, instead of the second column. Please help me.