当前位置: redice's Blog > TAG标签 > yield
日期:11-04-25 |
分类:Python |
标签:python生成器yieldenumerate |
0 Comments
PEP 279 -- The enumerate() built-in function( http://www.python.org/dev/peps/pep-0279/ )给出了enumerate()的源码如下: def enumerate(collection): 'Generates an indexed series: (0,coll[0]), (1,coll[1]) ...' i = 0 it = iter(collection) wh
-
共1页/1条