The math.lcm() function is used to calculate the least common multiple of two or more numbers. 

Syntax:
math.lcm(*args)
copy

Where, args represents the arbitrary integer arguments whose LCM is to be calculated. The number of the arguments should be greater than or equal to 2.

The LCM of given integers is the smallest number that is a multiple of all the numbers provided as arguments. For example, the LCM of  4 and 5 is 20 since 20 is the smallest number that is a multiple of both 4 and 5.

ExampleEdit & Run
import math

>>> math.lcm(3, 4)
12
>>> math.lcm(1, 2, 3)
6
>>> math.lcm(10, 20, 50)
100
>>> math.lcm(18, 12, 32)
288
>>> math.lcm(7, 11, 13, 17, 19, 23)
7436429
copy

The arguments passed to the math.lcm() function should be strictly integers. Otherwise, a TypeError is raised.

ExampleEdit & Run
import math

math.lcm(12, 13.6)
copy
Output:
Traceback (most recent call last):   File "<string>", line 3, in <module> TypeError: 'float' object cannot be interpreted as an integer [Finished in 0.010752098634839058s]