Ad
Code
Diff
  • factorial=f=lambda _:_*f(_-1)if _ else 1
    • def factorial(n):
    • if n == 1:
    • return 1
    • else:
    • return n * factorial(n-1)
    • factorial=f=lambda _:_*f(_-1)if _ else 1