📅  最后修改于: 2022-03-11 14:45:30.048000             🧑  作者: Mango
# one line Logic factorial
def factorial(i):
return 1 if (i==1 or i==0) else i * factorial(i-1)
num = int(input('Enter Number : '))
print('factorial of number', num, 'is',factorial(num))