Last active
June 7, 2016 15:19
-
-
Save ParthKolekar/5586db04e1e345cbd7eae335064d9a9a to your computer and use it in GitHub Desktop.
One liner recursive fibonacci in python
This file contains 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 fibonacci(n): return 1 if not n or not n - 1 else fibonacci(n - 1) + fibonacci(n - 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment