def recursion(n): if n == 0: return 1 return n * recursion(n-1) result = recursion(5) print(result)
实现的结果:5*4*3*2*1=120