Well, this article
        http://pythonjournal.cognizor.com/pyj1/AMKuchling_algorithms-V1.html
was the first hit on google for '"euclid's algorithm" python'.

It contains this function:
    def GCD(a,b):
        assert a >= b     # a must be the larger number
        while (b != 0):
            remainder = a % b
            a, b  = b, remainder
        return a

Jeff

Attachment: pgp4mLeEeIsaC.pgp
Description: PGP signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to