0

Beginner python. Error writing csv record in pydroid 3 on Samsung s9+

hi .. new to SO & pydroid. Copied code from book but runtime errors in pydroid 3. code >>

import csv
file=open (''stars.csv","w")
newrecord="brian,73,taurus\n"
file.write(str(newrecord))
file.close()

output attached.

Advice appreciated.

Many thanks in advance

Gary
Becketg
  • 1
  • 1
  • Please take the time to revew https://stackoverflow.com/help/how-to-ask . We need more details, like the actual output you get, the full error messages, etc. – joanis Mar 25 '23 at 02:00
  • Also, you have an obvious typo on the second line, with the opening quotes being two single quotes instead of a double quote. Please fix that first. – joanis Mar 25 '23 at 02:01
  • inconsistent quotes. It ran ok. many thanks – Becketg Mar 26 '23 at 18:03

0 Answers0