factorial = lambda n: n * factorial(n-1) if n > 1 else 1 print(factorial(3)) # 6 print(factorial(5)) # 120