Python2017/labs03/task02.py
2017-12-16 00:02:00 +01:00

10 lines
146 B
Python

def fib(n):
l = [0, 1,]
for i in range(2, n):
l.append(l[i-1] + l[i-2])
yield l
x = fib(7)
for i in x:
print(i)