File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -194,5 +194,27 @@ print(text)
194194
195195```
196196
197+ ## Working with Files
198+
199+ ```
200+ file_obj = open(file_name, "<mode>")
201+ ```
202+
203+ | Mode | Description |
204+ | ------------- | :-------------:|
205+ | "r" | Read only. Default mode. |
206+ | "rb" | Read only in binary format |
207+ | "r+" | Read and write |
208+ | "rb+" | Read and write in binary format |
209+ | "w" | Write only. Overwrites existing file or creates a new file. |
210+ | "wb" | Write only in binary format. Overwrites existing file or creates a new file. |
211+ | "w+" | Read and write. Overwrites existing file or creates a new file. |
212+ | "wb+" | Read and write in binary format. Overwrites existing file or creates a new file. |
213+ | "a" | Append to existing file or creates new file. |
214+ | "ab" | Append to existing file or creates new file in binary format. |
215+ | "a+" | Read and append. Overwrites existing file or creates a new file. |
216+ | "ab+" | Read and append in binary format. Overwrites existing file or creates a new file. |
217+
218+
197219
198220
You can’t perform that action at this time.
0 commit comments