We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 414614f + 8471960 commit 3c0dca1Copy full SHA for 3c0dca1
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