Fibonacci

Simple python fibonacci sequence generator

Fibonacci
from collections import deque 

chain = deque([0, 1])
length = 20

for i in range(length):
    chain.append(chain[0]+chain[1])
    print(chain.popleft())