Skip to content

Instantly share code, notes, and snippets.

@xcv58
Created September 23, 2016 14:43
Show Gist options
  • Save xcv58/7bbc1e84a8f8e3844148ab4427a99dd1 to your computer and use it in GitHub Desktop.
Save xcv58/7bbc1e84a8f8e3844148ab4427a99dd1 to your computer and use it in GitHub Desktop.
def is_prime(n):
return [1 for i in range(2, n) if n % i is 0] == []
print [i for i in range(2, 100) if is_prime(i)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment