Python Tutorial - How to calculate factorial using recursion function in Python Language?

Following is the code to calculate factorial using recursion function : 
 
def fact(x):
    sum=0
    if x ==1:
        return x
    else:
        sum += x*fact(x-1)
        return sum
 
print(fact(1000)) 
 
Language: