1
0
forked from tdwojak/Python2017
Python2017/labs03/task02.py

10 lines
146 B
Python
Raw Normal View History

2017-12-16 00:02:00 +01:00
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)