Created
May 23, 2012 00:04
-
-
Save categulario/2772442 to your computer and use it in GitHub Desktop.
Lista de números primos del 1 al 100 en python (una sola línea)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Lista de numeros primos entre 1 y 100 en una sola linea | |
c = [i for i in xrange(2,101) if (i%2!=0 or i==2) and (i%3!=0 or i==3) and (i%5!=0 or i==5) and (i%7!=0 or i==7)] | |
print c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hice un código en una linea que genera los números primos de 1 a n
Complete code here. (Código completo aquí)