Browse Source

File

pull/10/head
Jure Šorn 6 years ago
parent
commit
0f3c838498
1 changed files with 9 additions and 7 deletions
  1. 16
      README.md

16
README.md

@ -846,13 +846,15 @@ while True:
``` ```
#### Modes: #### Modes:
* `'r'` - open for reading (default) * `'r'` - read (default)
* `'w'` - open for writing, erasing the file first * `'w'` - write (truncate)
* `'x'` - open for exclusive creation, failing if the file already exists * `'x'` - write or fail if the file already exists
* `'a'` - open for writing, appending to the end of the file if it exists * `'a'` - append
* `'b'` - binary mode * `'w+'` - read and write (truncate)
* `'t'` - text mode (default) * `'r+'` - read and write from begining
* `'+'` - open a disk file for updating (reading and writing) * `'a+'` - read and write from end
* `'b'` - binary mode
* `'t'` - text mode (default)
#### Read Text from File: #### Read Text from File:
```python ```python

|||||||
100:0
Loading…
Cancel
Save