def factorial (x):
    if x == 1: # base condition
        return 1
    else:
        y = factorial (x-1)
        print (y,"*",x,"=",x * y)
        return (x * y)

# testing factorial function for a given number
number = 50
print ("Computing", number, "!")
factorial (number)

# program: Factorial recursive function
# implementation in Python 3.x: A.-P. Gaspar




Factorial recursive function in Python ?




YOUTUBE