Skip to content

Instantly share code, notes, and snippets.

@buildwithmh
Created July 24, 2018 12:55
Show Gist options
  • Save buildwithmh/9878cd0e1ad9cf1139cd269d8f371b78 to your computer and use it in GitHub Desktop.
Save buildwithmh/9878cd0e1ad9cf1139cd269d8f371b78 to your computer and use it in GitHub Desktop.
def is_prime(*, number: int):
stop = int(math.sqrt(number)) + 1
return all(number % divisor != 0 for divisor in range(2, stop))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment