a better prime number generator

Rikard Bosnjakovic rikard at strakt.com
Mon Oct 22 16:08:26 CEST 2001

John Thingstad wrote:

> This should work fast up to say 10000. 


> 		set = [x for x in set if x== n or x % p != 0)

That comprehension does not work. Where do you define "p"?

Rikard Bosnjakovic                               http://bos.hack.org/cv/
Python Hacker                                          rikard at strakt.com
AB Strakt                                                   bos at hack.org

More information about the Python-list mailing list