To find the Factorial of a number.
if n==1: return n
else: return n * factorial(n-1)
Factorial is a non-negative integer. It is the product of all positive integers less than or equal to that number you ask for factorial. It is denoted by an exclamation sign (!).
return 1 if (n==1 or n==0) else n * fact(n - 1);
Using built-in function