Skip to content

Instantly share code, notes, and snippets.

@zhenyi2697
Created February 24, 2013 10:49
Show Gist options
  • Save zhenyi2697/5023390 to your computer and use it in GitHub Desktop.
Save zhenyi2697/5023390 to your computer and use it in GitHub Desktop.
Python: Simple Fibonacci Sequences
>>> a, b = 0, 1
>>> while b < 1000:
... print b,
... a, b = b, a+b
...
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment