打印范围内的斐波那契数 def fib(): a = 1 b = 1 c = a + b while True: a = b b = c c = a + b yield c for fn in fib(): if fn < 1000: print (fn) else: break