Skip to content

Instantly share code, notes, and snippets.

@svalleru
Last active October 16, 2015 19:40
Show Gist options
  • Save svalleru/216916387492cdf82122 to your computer and use it in GitHub Desktop.
Save svalleru/216916387492cdf82122 to your computer and use it in GitHub Desktop.
RecursiveFactorial
#recursion technique is always fascinating!
def factorial(n):
return 1 if (n < 1) else n * factorial(n-1)
factorial(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment