0

I've attempted to use included functions as well as attempting to write my own, but unfortunately i was unsuccessful. Hopefully someone more experienced than myself has run into this issue and come up with a solution.

  • 4
    How about the `gcd` function from Python's `fractions` module? `gcd(a, gcd(b, c))` gives you the greatest common divisor of `a`, `b` and `c`. – Mark Dickinson Feb 25 '16 at 19:56
  • Or more generally, `reduce(fractions.gcd, list_of_numbers)`. – Sven Marnach Feb 25 '16 at 19:59
  • @MasonAlphonse, welcome to stackoverflow. As you see, your question has been asked before so it's in the process of being marked as a duplicate. Look there for the answer (hint: Don't just look at the accepted answer-- the next one is more useful). – alexis Feb 25 '16 at 20:01

0 Answers0