I have a list called itemresults
that looks like this:
['24500', '17000', '60000', '56300', '24500', '24500', '114950', '32000', '70000', '46948', '133000', '49550', '51600', '35995', '44500', '19300', '34200', '39964', '59900', '27999', '16100', '39000', '78995', '19101', '25000', '30000', '72000', '39900', '30000', '29000', '24900', '22990', '52600', '82600', '64000', '13999', '29500', '46800', '95000', '42900', '32500', '3969', '36000', '32995', '24000', '49999.99', '37500', '34000', '47600', '43500', '28500']
I would like to write this to a csv file so that each row, would be an item from the list so essentially looking like this:
24500
17000
60000
56300
24500
.....
I have tried doing this with different methods, but each time, it just writes the whole list in one cell. I have tried using a nested list like this:
outputFile = open('outputFile.csv', 'w', newline='')
outputWriter = csv.writer(outputFile)
outputWriter.writerow([elements])
But that still just writes the whole list to the first cell. I am looking to write each item to a new row. Does anyone know how I could achieve this? Thanks