Created
July 5, 2018 18:17
-
-
Save augustovictor/786a1546c33d8147b3aa931fdf62d8bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| r for reading | |
| r+ opens for reading and writing (cannot truncate a file) | |
| w for writing | |
| w+ for writing and reading (can truncate a file) | |
| rb for reading a binary file. The file pointer is placed at the beginning of the file. | |
| rb+ reading or writing a binary file | |
| wb+ writing a binary file | |
| a+ opens for appending | |
| ab+ Opens a file for both appending and reading in binary. The file pointer is at the end of the file if the file exists. The file opens in the append mode. | |
| x open for exclusive creation, failing if the file already exists (Python 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment