Math Functions

math.lcm()

Find the nonnegative least common multiple of integers. Any zero argument gives zero; no arguments give one.

Formal Syntax & Structure

python syntaxpython
math.lcm(*integers)

Parameters & Attributes

NameTypeDescription
integersintZero or more integer operands.

Return Value

int

Integer result, exact for integer arithmetic.

Working Example

Example Snippetpython
import mathprint(math.lcm(6, 8, 10))
Python Reference