Skip to content

Commit ce2cc79

Browse files
committed
对于python3 next()的补充
1 parent cdedf9c commit ce2cc79

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

128.md

Lines changed: 3 additions & 1 deletion
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()`就是要获得下一个元素,但是做为一名优秀的程序员,最佳品质就是“懒惰”,当然不能这样一个一个地敲啦,于是就:
@@ -209,4 +211,4 @@
209211

210212
[总目录](./index.md)&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;[上节:文件(2)](./127.md)&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;[下节:练习](./129.md)
211213

212-
如果你认为有必要打赏我,请通过支付宝:**[email protected]**,不胜感激。
214+
如果你认为有必要打赏我,请通过支付宝:**[email protected]**,不胜感激。

0 commit comments

Comments
 (0)