files and i/o — moving data in and out6 / 9
csv and jsonl — the two formats ai moves data in
AI wrote a CSV reader that "works on my machine" and breaks on
Windows: every other row comes back blank because of how Windows
line endings interact with csv.DictReader.
The fix is one keyword argument on the open call. Add newline=""
to line 11 so the reader handles line endings correctly across
platforms. The expected output is two rows printed.
The break is on line 11 — but read the whole snippet first.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _