阶乘

def fact(x):
    return x > 1 and x * fact(x - 1) or 1
print fact(6)

编程技巧