I am using the csv module to create a file then write to it. However, nothing is being written to the .csv file.
Here is my code:
import csv
with open('eggsandham.csv', 'wb') as csvfile:
spamwriter = csv.writer(csvfile, delimiter=' ',
quotechar='|', quoting=csv.QUOTE_MINIMAL)
spamwriter.writerow(['Spam'] * 5 + ['Baked Beans'])
spamwriter.writerow(['Spam', 'Lovely Spam', 'Wonderful Spam'])
Does anyone know why this is happening?