Skip to content

Instantly share code, notes, and snippets.

@ManuelZ
Created August 6, 2010 23:56
Show Gist options
  • Save ManuelZ/512233 to your computer and use it in GitHub Desktop.
Save ManuelZ/512233 to your computer and use it in GitHub Desktop.
def es_primo(numero):
for i in range(2, numero):
if numero%i == 0:
return False
return True
lista = []
for i in range (2, 10000):
if es_primo(i):
lista.append(i)
if lista.__len__() == 20:
break
print lista
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment