Answers for "math.lcm() function in Python"

2

lcm math python library

from math import gcd
def lcm(a,b):
  return a*b/(gcd(a,b))
print(lcm(12,70))
//output: 420
Posted by: Guest on June-07-2020

Python Answers by Framework

Browse Popular Code Answers by Language