[Tutor] primes

Gregor Lingl glingl at aon.at
Thu Mar 17 23:28:35 CET 2005


Hi!
Who knows a more concise or equally concise but more efficient
expression, which returns the same result as

[x for x in range(2,100) if not [y for y in range(2,x) if x%y==0]]

Gregor

P.S.: ... or a more beautiful one ;-)



More information about the Tutor mailing list