Course
Simulator
More
Premium
Log in
Python Function Reference
Functions
math.factorial
math.factorial
Return the factorial of x.
Python 3.13
1
math
.
factorial
(
x
)
x
A non-negative integer.
Examples
Python 3.13
1
2
import
math math
.
factorial
(
5
)
120