files and i/o — moving data in and out6 / 9
pathlib — the file api ai should reach for first
Cursor wrote string concatenation to build a path. It works on Linux and macOS by accident, but it's the wrong shape — and on Windows it would join with the wrong separator entirely.
Replace lines 5 and 6 so they use a single Path object built with
the / operator. The output should be the file's contents:
hello.
The break is on lines 5, 6 — but read the whole snippet first.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _