📜  python代码示例中的Python递归函数是什么

📅  最后修改于: 2022-03-11 14:46:18.154000             🧑  作者: Mango

代码示例1
pythonCopydef fact(n):
    """Recursive function to find factorial"""
    if n == 1:
        return 1
    else:
        return (n * fact(n - 1))
a = 6
print("Factorial of", a, "=", fact(a))