You are viewing a single comment's thread. Return to all comments →
Why the cache? Also your dolution doesn't work for 0. You could just do:
def extraLongFactorials(n): return 1 if n == 0 else n * extraLongFactorials(n-1)
Extra Long Factorials
You are viewing a single comment's thread. Return to all comments →
Why the cache?
Also your dolution doesn't work for 0.
You could just do: