> Something like this should work: > def lcm2(a, b): > return a*b/fractions.gcd(a,b) > > def lcm(mylist): > return reduce(lcm2, mylist) >
Actually, this probably should be "reduce(lcm2, mylist, 1)" navin. _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers