It's the first time I want to write in a CSV file and there are some strings I want to write as output. I used 'writerow' function but it writes them in list type while I simply want them to be strings has anyone have any idea what should I do?
my code:
with open (r'C:\Users\part pardaz\Desktop\out_put.csv' , mode='w' , newline='' ) as ff :
mean_writer=csv.writer(ff)
for item in (names):
print(item)
my_row=[item + ',' + means[item] ]
print(my_row)
mean_writer.writerow((my_row))
I want my output to be like this:
jack,23
mike,76
but it's like this:
[jack,23]
[mike,76]