Python learning resources
Beginner to advanced Python guides, cheatsheets, books and projects.
For data science, backend and automation.
Join π https://rebrand.ly/bigdatachannels
DMCA: @disclosure_bds
Contact: @mldatascientist
Post #1249
782
π Understanding Python File Modes
When opening a file, the mode determines what you're allowed to do.
Mode Meaning
π Using the wrong mode is one of the easiest ways to accidentally erase a file.
When opening a file, the mode determines what you're allowed to do.
Mode Meaning
r π Read onlyw π Write (overwrites existing file)a π Append to the endx π Create a new filerb π Read binary fileswb π Write binary filesr+ π Read and writeπ Using the wrong mode is one of the easiest ways to accidentally erase a file.
- π₯ 4



