Skip to content

Instantly share code, notes, and snippets.

@MostAwesomeDude
Created December 1, 2010 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MostAwesomeDude/724398 to your computer and use it in GitHub Desktop.
Save MostAwesomeDude/724398 to your computer and use it in GitHub Desktop.
def fib():
i, j = 0, 1
while True:
yield i
i, j = j, i + j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment