Skills: Python +1
Leestijd: < 1 Minuut
1 2 3 4 5 6 7 8 9 10 11 |
def fibonacci(): a = 1 b = 1 yield a yield b for i in xrange(10): a, b = a + b, a yield a for fibonacci_number in fibonacci(): print "Fibonacci: %d" % fibonacci_number |