News for hackers. Stuff that matters.
Re:Codepad.org | a pastebin that executes code for you by nirmal on Sunday October 11, 2009 @11:31AM (#874787)
http://codepad.org/MzI2fqg7

  from itertools import *

  primes = (i for i in count(2) if all(imap(lambda x:i%x,xrange(2,i/2))))
My Python code for a generator expression to loop on prime numbers.
Re:Codepad.org | a pastebin that executes code for you by notaddicted on Sunday October 11, 2009 @02:40PM (#875039)
you only need to check for divisors up to sqrt(i)

http://codepad.org/VMSqtLbS

Re:Codepad.org | a pastebin that executes code for you by nirmal on Sunday October 11, 2009 @06:49PM (#875455)
Arghh, you are right. I wonder if this will make any difference in my Project Euler problem solutions.