I have some list like so:
[['CD', 'CC', 'CD'], 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
[['DT', 'CC', 'CD'], 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1]
[['EX', 'CC', 'CD'], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[['JJ', 'CC', 'CD'], 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1]
And I want write these list into a csv file column wise. What I did so far:
for i in range(1,840):
# function which compute the result value
result=Count_SP(i,leng_second,first_position+1,second_position)
final.append(result)
print final # final contains lists
File_Write(final) # File_Write() writes the final into a csv file
Output needed:
['CD', 'CC', 'CD'],['DT', 'CC', 'CD'],['EX', 'CC', 'CD'],['JJ', 'CC', 'CD']
1,0,0,0
1,0,0,0
1,1,0,1
1,0,0,0
1,1,0,1
1,0,0,0
1,1,0,1
1,1,0,1
1,1,0,0
1,1,0,1
1,1,0,1
1,1,0,1