Skip to content

Commit 6d090b9

Browse files
authored
Update WorkingWithFiles.md
1 parent 110130d commit 6d090b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Python/Module5_OddsAndEnds/WorkingWithFiles.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ The following code opens the file "file1.txt" for writing:
135135
path_to_file = Path("file1.txt")
136136
with open(path_to_file, mode="w") as f:
137137
# The indented space enters the "context" of the open file.
138-
# Leaving the indented space exist the context of the opened file, forcing
139-
# the file to be closed. This is ensured even if our code causes an error
140-
# within this indented block
138+
# Leaving the indented space exits the context of the opened file, forcing
139+
# the file to be closed. This is ensured even if the code within the indented
140+
# block causes an error.
141141
f.write('this is a line.\nThis is a second line.\nThis is the third line.')
142142

143143
# The file is closed here.

0 commit comments

Comments
 (0)