# 1、斐波那契数列生成器 # def fbnq(n): # a=0 # b=1 # i=0 # while i<n: # a,b=b,a+b # yield i+1,a,a+b # i+=1 # f=fbnq(10) # for x in f: # print(x)