Clear python solution


#1
def gcd(self, A, B):
    if A < B:
        A, B = B, A
        
    while B:
        A, B = B, A % B
        
    return A