Since the computer’s memory (RAM) is volatile, it loses any stored data when the power is turned off. So any data that needs to be stored permanently must be saved in a file.
A file is a named location on a disk drive that is used to store data. Each file is identified by its filename.
Python contains inbuilt functions for reading data from files, as well as creating and writing to files.
In this chapter, we’ll take a look at how to open files, how to read from a file, and how to write to a file.
We’ll take a look ...