The factorial() function of the math library can be used to compute the factorial of any integer.
The math module of NumPy also has the factorial() function.
Example:
>>> import numpy as np
>>> np.math.factorial(5)
120
>>> import math
>>> math.factorial(5)
120