Fibonacci
Simple python fibonacci sequence generator
from collections import deque
chain = deque([0, 1])
length = 20
for i in range(length):
chain.append(chain[0]+chain[1])
print(chain.popleft())
Simple python fibonacci sequence generator
from collections import deque
chain = deque([0, 1])
length = 20
for i in range(length):
chain.append(chain[0]+chain[1])
print(chain.popleft())