I wish to write the list files into a csv file:
a = ['0.18 man::-1_-1king|new\n', '0.19 gif::-2manchester\n', '0.177 united\n']
How can I do it?
Here are my codes :
import csv
a = ['0.18 king\n', '0.19 manchester\n', '0.177 united\n']
with open("output.csv",'wb') as resultFile:
wr = csv.writer(resultFile)
wr.writerows(a)
I wanted my results to be something like this:
Column 1 Column 2
0.18 man::-1_-1king|new
0.19 gif::-2manchester
0.177 united