1
0
forked from tdwojak/Python2017
Python2017/labs03/task02.py
2017-12-09 23:16:43 +01:00

14 lines
204 B
Python

#!/usr/bin/env python2
# -*- coding: utf-8 -*-
def fibonacci(n):
fn = [0, 1,]
for i in range(2, n):
fn.append(fn[i-1] + fn[i-2])
yield fn
a = fibonacci(10)
for i in a:
print(i)