The math module in the standard library provides a wide range of mathematical functionality. The module defines  functions  for performing various mathematical operations such as trigonometry, logarithmic operations, exponential operations, etc. It also includes several mathematical constants such as  pi and e


Trigonometric Functions
sin(x) Returns the sine of x (in radians)
cos(x) Returns the cosine of x (in radians)
tan(x) Returns the tangent of x (in radians).
asin(x) Returns the arc sine of x in radians
acos(x) Returns the arc cosine of x in radians.
atan(x) Returns the arc tangent of x in radians.
atan2(x, y) Returns the arc tangent of y/x .
Hyperbolic Functions
sinh(x) Returns the hyperbolic sine of x (in radians).
cosh(x) Returns the hyperbolic cosine of x (in radians).
tanh(x) Returns the hyperbolic tangent of x (in radians).
asinh(x) Returns the inverse hyperbolic sine of x (in radians).
acosh(x) Returns the inverse hyperbolic cosine of x (in radians).
atanh(x) Returns the inverse hyperbolic tangent of x (in radians).
Exponential and Logarithmic Functions
exp(x) Returns e raised to the power of x.
sqrt(x) Returns the square root of x.
pow(x, y) Returns x raised to the power of y.
log(x[, base]) Returns the natural logarithm (base e) of x. The base argument is optional and defaults to e.
log10(x) Returns the base 10 logarithm of x.
log2(x) Returns the base 2 logarithm of x.
Rounding and Remainder Functions
ceil(x) Returns the smallest integer greater than or equal to x.
floor(x) Returns the largest integer less than or equal to x.
trunc(x) Returns the integer part of x (truncates the decimal part).
fmod(x, y) Returns the remainder when x is divided by y.
modf(x) Returns the fractional and integer parts of x as a tuple.
The Rest
fabs(x) Returns the absolute value (magnitude) of x.
factorial(x) Returns the factorial of x, which is the product of all positive integers up to x.
gcd(*args) Returns the greatest common divisor of the integer arguments.
lcm(*args) Returns the least common multiple of the integer arguments
isfinite(x) Returns True if x is a finite number, False otherwise.
isinf(x) Returns True if x is positive or negative infinity, False otherwise.
isnan(x) Returns True if x is NaN (Not a Number), False otherwise.
isqrt(n) Returns the integer square root of n (the largest integer whose square is less than or equal to n).
ldexp(x, i) Returns x * (2**i), where x is the significand and i is the exponent.
frexp(x) Returns the mantissa and exponent of x as a pair (m, e), where m is a float with an absolute value between 0.5 (inclusive) and 1.0 (exclusive), and e is an integer such that x == m * 2**e. If x is 0, the pair (0.0, 0) is returned.
degrees(x) Converts the angle x from radians to degrees.
radians(x) Converts the angle x from degrees to radians.
copysign(x, y) Returns a value with the magnitude of x and the sign of y
fsum(iterable) Returns the sum of all items in the iterable.
gamma(x) Returns the gamma function of x.
hypot(x) Returns the Euclidean norm of x
isclose(a, b) Checks whether two values are close to each other, or not
lgamma(x) Returns the log gamma value of x.
prod(iterable) Returns the product of all the elements in the iterable
perm(n, k = None) Returns the number of ways to choose k items from n items with order and without repetition
remainder(a, b) Returns the closest value that can make a completely divisible by the b.
erf(x) Returns the error function of x.
erfc(x) Returns the complementary error function of a number.
dist(a, b) Returns the Euclidean distance between a and b.
comb(k, n) Returns the number of ways to choose k items from n items without repetition and order


Constant Description
e Returns Euler's number (2.7182...)
inf Returns a floating-point positive infinity
nan Returns a floating-point NaN (Not a Number) value
pi Returns PI (3.1415...)
tau Returns tau (6.2831...)

To use a  function or a constant, you first import the math  module as shown below:

import math

print([1, 2, 3, 4, 5, 6, 7]))

Alternatively, you can explicitly import the exact function or constant as shown below:

from math import e, perm, lcm


print(lcm(12, 7, 9))