DATA FILE HANDLING
DATA FILE HANDLING File - A file is a sequence of bytes on the disk/permanent storage where a group of related data is stored. File handling in Python enables us to create, update, read, and delete the files stored on the file system through our python program. Data File handling takes place in the following order. 1- Opening a file. 2- Performing operations (read, write) or processing data. 3- Closing the file. Types of File in Python: Python allows us to create and manage three types of data files. 1- Text file 2- Binary file 3- CSV file Text file: A text file is simply a sequence of ASCII or Unicode characters. A line is a sequence of characters, stored in permanent storage. In a text file, each line is terminated by a special character, known as End of Line (EOL). Text files can be created using any text editor. Ex. Myfile.txt. Binary file: A binary file stores the data in the same way as stored in the memory. The .exe files, mp3 file, image files, word documents are ...