Skip to content

Commit 0371388

Browse files
authored
Merge pull request yidao620c#325 from distanters/patch-1
dropwhile() 示例代码错误
2 parents 26ab1d8 + 092eaf6 commit 0371388

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/c04/p08_skip_first_part_of_iterable.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
4242
>>> from itertools import dropwhile
4343
>>> with open('/etc/passwd') as f:
44-
... for line in dropwhile(lambda line: not line.startswith('#'), f):
44+
... for line in dropwhile(lambda line: line.startswith('#'), f):
4545
... print(line, end='')
4646
...
4747
nobody:*:-2:-2:Unprivileged User:/var/empty:/usr/bin/false

0 commit comments

Comments
 (0)