can someone please help me?
I have a list:
list = [('ac', [1, 1]), ('alex.miller', [1, 2]), ('blossom', [2, 3])]
I want to write it into CSV file to look like this:
ac,1,1
alex.miller,1,2
blossom,2,3
So far I tried (also tried to split the integer list, convert it to string and concatenate it back with row[0] but with no success, the output was like a,c,1,1 a,l,e,x,.,m etc.):
with open(r"user_statistics.csv", "a+") as csvfile_user:
writer = csv.writer(csvfile_user)
for row in list:
writer.writerow(row)
But the output is:
ac,"[1, 1]"
alex.miller,"[1, 2]"
blossom,"[2, 3]"
How can I achieve this?