Skip to content

Instantly share code, notes, and snippets.

Created May 23, 2014
What would you like to do?
Fib generator
def fib():
x, y = 0,1
while True:
yield x
x, y = y,x+y
print [ for x in xrange(40)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment