Skip to content

Commit 29743d3

Browse files
SeanChaoswaroopch
authored andcommitted
fix code error
1 parent 9544a27 commit 29743d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exceptions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ We do the usual file-reading stuff, but we have arbitrarily introduced sleeping
9494

9595
Observe that the `KeyboardInterrupt` exception is thrown and the program quits. However, before the program exits, the finally clause is executed and the file object is always closed.
9696

97-
Notice that a variable assigned a value of 0 or `None` or a variable which is an empty sequence or collection is considered `False` by Python. This is why we can use `if: f` in the code above.
97+
Notice that a variable assigned a value of 0 or `None` or a variable which is an empty sequence or collection is considered `False` by Python. This is why we can use `if f:` in the code above.
9898

9999
Also note that we use `sys.stdout.flush()` after `print` so that it prints to the screen immediately.
100100

0 commit comments

Comments
 (0)