We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 414614f commit 8471960Copy full SHA for 8471960
source/c04/p01_manually_consuming_iterator.rst
@@ -32,7 +32,7 @@
32
33
with open('/etc/passwd') as f:
34
while True:
35
- line = next(f)
+ line = next(f, None)
36
if line is None:
37
break
38
print(line, end='')
0 commit comments