Free web edition
Reading, writing, and organizing files
A short, example-driven guide to working with files in Python: opening them safely, handling text and encodings, using pathlib for paths, and reading and writing CSV and JSON. Nothing here needs a package you have to install, and every example was run when the book was built. By the end you can get data in and out of a file without looking it up.
The web edition is the whole book, free. The paid PDF is the same words in a form you can keep: offline, a clickable table of contents and outline, easy to read on a tablet or e-reader, and it pays for the next one.
Get Python File Handling — $12