def Fibo(n): if n == 0: yield 0 if n == 1: yield 0 else: yield (Fibo - 1) + (Fibo - 2) for i in Fibo(10): print (i)