Skip to content

Commit 8550d76

Browse files
committed
Merge pull request qiwsir#46 from theJian/patch-3
对于python3 next()的补充
2 parents fe785ff + 4d98e83 commit 8550d76

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎128.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
File "<stdin>", line 1, in <module>
4747
StopIteration
4848

49+
> 在python3中, lst_iter.next()方法变成了lst_iter.\_\_next__(). 取而代之的是next(lst_iter).
50+
4951
`iter()`是一个内建函数,其含义是:
5052

5153
上面的`next()`就是要获得下一个元素,但是做为一名优秀的程序员,最佳品质就是“懒惰”,当然不能这样一个一个地敲啦,于是就:

0 commit comments

Comments
 (0)