What is the most efficient ("pythonic") way to test/check if two numbers are co-primes (relatively prime) in Python.
For the moment I have this code:
def gcd(a, b):
while b != 0:
a, b = b, a % b
return a
def coprime(a, b):
return gcd(a, b) == 1
print(coprime(14,15)) #Should be true
print(coprime(14,28)) #Should be false
Can the code for checking/testing if two numbers are relatively prime be considered "Pythonic" or there is some better way?