I’ve been doing something with primes in python, and I’m currently using this
def isDivisible(number,divisor):
if number % divisor == 0:
return True
return False
to check if a number is divisible by the divisor.
So I was wondering if there was a faster way to do this?
What about:
return (number % divisor == 0)