Skip to content

Instantly share code, notes, and snippets.

@MohamedHajr
Created July 24, 2018 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MohamedHajr/9878cd0e1ad9cf1139cd269d8f371b78 to your computer and use it in GitHub Desktop.
Save MohamedHajr/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