File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ we created to a list of lines.
132132
133133Trying to open a non-existent file with ` w ` created the file for us, but
134134doing that with ` r ` gives us an error instead. We'll learn more about
135- errors later.
135+ errors [ later] ( exceptions.md ) .
136136
137137``` py
138138>> > with open (' this-doesnt-exist.txt' , ' r' ) as f:
@@ -145,7 +145,7 @@ FileNotFoundError: [Errno 2] No such file or directory: 'this-doesnt-exist.txt'
145145```
146146
147147So now we have the hello world in the ` lines ` variable, but it's
148- ` ['Hello World!\n'] ` instead of ` ['Hello World!'] ` . So what the heck did
148+ ` ['Hello World!\n'] ` instead of ` ['Hello World!'] ` . So what the heck is
149149that ` \n ` doing there?
150150
151151` \n ` means newline. Note that it needs to be a backslash, so ` /n `
You can’t perform that action at this time.
0 commit comments