I am using Spyder and accessing the reddit API to get some data and write it to csv, when I print out the lines, everything works fine, but then the csv file just doesn't get created, I tried many things but nothing seems to work, and a very similar piece of code worked out fine and I got the csv file, so I have no idea what the problem is.
with open('finalplswork.csv', 'wb') as fl:
writr = csv.writer(fl)
for subid in idsss:
submission = r.get_submission(submission_id=subid)
created_utc=submission.created_utc
created_date_utc = datetime.fromtimestamp(created_utc)
data=(subid, created_utc, created_date_utc)
writr.writerow(data)