You can write data to a file, and read that data back in on subsequent runs. (If the file doesn't exist, or if it is zero length, let the program start from scratch.) This approach is quite practical if you only need to save one or two items of data.
Slightly more generally, persistence is a term commonly used to refer to maintaining data across multiple executions of a program.
See, for example, persistence for Python 2.7 and persistence for Python 3. There, pickling or marshalling data are described. Use functions like dumps()
to serialize data for storage, and loads()
to de-serialize it. This approach is practical if you save lots of data or if you save complicated data structures.