Chapter 4. Persistence: Saving data to files

It is truly great to be able to process your file-based data. But what happens to your data when you’re done? Of course, it’s best to save your data to a disk file, which allows you to use it again at some later date and time. Taking your memory-based data and storing it to disk is what persistence is all about. Python supports all the usual tools for writing to files and also provides some cool facilities for efficiently storing Python data. So...flip the page and let’s get started learning them.
Programs produce data
It’s a rare program that reads data from a disk file, processes the data, and then throws away the processed data. Typically, programs save the data they process, display their output on screen, or transfer data over a network.

Before you learn what’s involved in writing data to disk, let’s process the data from the previous chapter to work out who said what to whom.
When that’s done, you’ll have something worth saving.