The Python Standard Library is a collection of built-in modules, each providing specific functionality beyond what is included in the “core” part of Python. For example, the math module provides additional mathematical functions, and the random module provides the ability to generate random numbers, which is useful in programming.
To utilize the capabilities of a given module in a specific
program, an import
statement is used.
The syntax for using the factorial function is
math.factorial(n)
,
where n
is
some positive integer.