May 2019
Beginner
528 pages
29h 51m
English
The table lists each mode and a corresponding description, as follows. Mode r: Open a text file for reading. This is the default if you do not specify the file-open mode when you call open. Mode w: Open a text file for writing. Existing file contents are deleted. Mode a: Open a text file for appending at the end, creating the file if it does not exist. New data is written at the end of the file. Mode r plus: Open a text file reading and writing. Mode w plus: Open a text file reading and writing. Existing file contents are deleted. Mode a plus: Open a text file reading and appending at the end. New data is written at the end of the file. If the file does not exist, it is created.
Read now
Unlock full access