File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ use the `read()` method.
259
259
>> >
260
260
```
261
261
262
- You can also open full paths, like ` open('C:\\Users\\me', 'r') ` .
262
+ You can also open full paths, like ` open('C:\\Users\\me\\myfile.txt ', 'r') ` .
263
263
The reason why we need to use ` \\ ` when we really mean ` \ ` is that
264
264
backslash has a special meaning. There are special characters like
265
265
` \n ` , and ` \\ ` means an actual backslash.
@@ -294,9 +294,9 @@ you don't need to double anything or use `r` in front of paths.
294
294
>> >
295
295
```
296
296
297
- ## Example: File viewer
297
+ ## Examples
298
298
299
- The following program prints the contents of files:
299
+ This program prints the contents of files:
300
300
301
301
``` py
302
302
while True :
@@ -311,8 +311,6 @@ while True:
311
311
print (line.rstrip(' \n ' ))
312
312
```
313
313
314
- ## Example: User information
315
-
316
314
This program stores the user's username and password in a file.
317
315
Plain text files are definitely not a good way to store usernames
318
316
and passwords, but this is just an example.
You can’t perform that action at this time.
0 commit comments