Created
August 29, 2014 06:58
-
-
Save arbaaz/7d40328c7fd7b47d1ba0 to your computer and use it in GitHub Desktop.
Smallest Fibnocci code in python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fib(n): | |
a,b=0,1 | |
while a<n: | |
print a, | |
a,b=b,a+b | |
fib(20000000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment