My code looks like:
x=0
while (x<3):
print('purple'),
print('yellow'),
print({x})
x=x+1
I want it to log this data into a csv file named 'daffodils.csv'. How do I do this so that the iterations won't write over eachother?
For example, if I ran the program two times, my csv file will look like:
purple yellow 0
purple yellow 1
purple yellow 2
purple yellow 0
purple yellow 1
purple yellow 2
Thanks