Skip to content

Instantly share code, notes, and snippets.

@pmalek

pmalek/fib.py

Created Jul 15, 2016
Embed
What would you like to do?
python fibonacci
def fib_to(n):
fibs = [0, 1]
for i in range(2, n+1):
fibs.append(fibs[-1] + fibs[-2])
return fibs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment