码迷,mamicode.com
首页 > 编程语言 > 详细

Python 知识点

时间:2017-01-08 15:31:11      阅读:214      评论:0      收藏:0      [点我收藏+]

标签:and   print   gen   知识点   ble   decorator   next   nbsp   range   

1. generator

 #g is a generator and g is iterable

    g = (x*x for x in range(5))

    for n in g:

   print(n)

    # or 

    next(g)

2. decorator

3. iterator

 

Python 知识点

标签:and   print   gen   知识点   ble   decorator   next   nbsp   range   

原文地址:http://www.cnblogs.com/alexyuyu/p/6261998.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!