DEV Community

Kaveh Sabouri
Kaveh Sabouri

Posted on

How to get a factorial in Python

only write this :

from math import factorial
n = int(input())
print(factorial(n))
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
kavehsabouri profile image
Kaveh Sabouri

Dear Morava
thanks for your attention.
regards
Kaveh