November 2018
Beginner
304 pages
7h 35m
English
File creation is extremely easy with Python: you simply create the variable that will represent the file, open the file, give it a filename, and tell Python that you want to write to it.
If you don't expressly tell Python that you want to write to a file, it will be opened in read-only mode. This acts as a safety feature to prevent you from accidentally overwriting files. In addition to the standard w to indicate writing and r for reading, Python supports several other file access modes:
Read now
Unlock full access