OSCC · Python, Math · Sep 15, 2020
Calculates the greatest common divisor of a list of numbers.
from functools import reduce
from math import gcd as _gcd
return reduce(_gcd, numbers)
gcd([8, 36, 28]) # 4
Returns the least common multiple of a list of numbers.
Calculates the average of two or more numbers.
Converts a number to a list of digits.