摘要: g = [x for x in range(3)] # 列表生成式gg = [x * x for x in range(1,100) if x % 2 == 0]G = (x for x in range(3)) # 生成器 print type(g),type(G)# 输出 # 斐波那契数列 def fib(max): n, a, b = 0, 0, 1 while n < ... 阅读全文
posted @ 2017-05-09 22:53 随便了888 阅读(234) 评论(0) 推荐(0) 编辑