I need a good function to be able to pass a list of numbers and get the GCD or LCM from it, normally it would say:
def computeGCD(x, y):
while(y):
x, y = y, x % y
return x
>>> computeGCD(30, computeGCD(54, 72))
>>> 6
But I need a function to receive a list of numbers, can anyone help?