Files
摘要
Standard input and output functions accept user data from the console and display the data to the console. These values are stored in the variables of the program and are lost when the program terminates. When data to be taken from the console is large or when the data is to be saved even after the program terminates, it has to be stored in a permanent and non-volatile memory like secondary storage. The data is stored as a file on the secondary storage devices. A file is a container that stores the related information on secondary storage devices like hard disk, CD, pen drive, etc. Python supports reading from or writing data into files, called file handling. Python provides a number of library functions for performing different file operations like reading, writing, appending, etc.