def fact(n):
if n == 1:
return 1
result = n * fact(n - 1)
return result
print fact(5)
Factorial : 阶乘
def fact(n):
if n == 1:
return 1
result = n * fact(n - 1)
return result
print fact(5)
Factorial : 阶乘