python阶乘 发表于 2017-09-27 分类于 python fact = lambda n:1 if n == 0 else n * fact(n-1) >>> fact(6) 720 >>> reduce(lambda x,y:x*y, range(1, 7)) 720