def Fib(n): a, b = 0, 1 for _ in range(n): yield a a, b = b, a + b for c in Fib(7): print(c) ##(``F(0)=1, F(1)=1, FN=F(N-1) + F(N-2)``).