Skip to content

Instantly share code, notes, and snippets.

@xcv58
Created September 23, 2016 14:35
Show Gist options
  • Save xcv58/266c853a12bd45c00725ba9e5316a74f to your computer and use it in GitHub Desktop.
Save xcv58/266c853a12bd45c00725ba9e5316a74f to your computer and use it in GitHub Desktop.
def is_prime(n):
for i in range(2, n/ 2 + 1):
if n % i is 0:
return False
return True
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