promptdojo_

CSV and JSONL — the two formats AI moves data in — step 6 of 9

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.

full-screen editor opens — close anytime to keep reading.