November 2022
Beginner to intermediate
752 pages
19h 19m
English
I find that a project doesn’t feel real until I start working with files. Text-based files, the most common way to store data, are the key to retaining state between program runs.
While it’s perfectly simple to open a text file in Python, there are many silent subtleties that are often overlooked until they bite you in the rear. Many developers make do with some idiosyncratic combination of techniques that appear to work but are far removed from the beauty and simplicity of idiomatic Python.
In this chapter, I’ll break down the two central components involved in working with text files: streams and path-like ...
Read now
Unlock full access