I intend to append following list into a csv file so that it appears in a single row but my code isn't working. I'm a beginner in python. Any suggestions would be welcome. Thank You.
list_one = ['apple','ball','cat','dog']
I tried following code:
import csv
list = ['apple','cat','dog']
with open('document.csv','a') as fd:
fd.writerows(list)