O'Reilly logo

Learn to Program with Python 3: A Step-by-Step Guide to Programming by Irv Kalb

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Irv Kalb 2018
Irv KalbLearn to Program with Python 3https://doi.org/10.1007/978-1-4842-3879-0_9

9. File Input/Output

Irv Kalb1 
(1)
Mountain View, California, USA
 

In every program we have talked about so far, when the program ends, the computer forgets everything that happened in the program. Every variable you created, every string you used, every Boolean, every list—it’s all gone. But what if you want to keep some of the data you generate in a program and save it for when you run the program later? Or maybe you want to save some data so that a different program could use the data you generated.

If you want to keep some information around between runs of a program, you need a way of having what is called persistent data —you want the data to remain ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required