def fab2(max):
    n, a, b = 0, 0, 1
    while n < max:
        yield b
        a, b = b, a + b
        n = n + 1

# for n in fab(5):
#     print n
dataset/ETHPy150Open Akagi201/learning-python/yield/fab.py/fab2/original