摘要: def f(max): n, a, b = 0, 0, 1 while n <= max: yield b a, b = b, a + b n += 1 yield 'done' for i in f(5): print(i) 阅读全文
posted @ 2018-02-27 10:52 xusuns 阅读(360) 评论(0) 推荐(0) 编辑