Darn it. On Sat, Jul 18, 2009 at 8:55 AM, Dave Angel <da...@ieee.org> wrote:
> > You don't need a counter. len() will tell you the size of the list of > primes. Does len() go through and count by itself, or does it actually keep track of the size and just return the memory? I always thought it would go through and count, which may take some time. I could be wrong. > > And, just in case you're still interested, that > for i in range() > > earlier in the thread has the overhead of building a (possibly) large list > of integers, just in case we might need to loop. Right, so for i in xrange() would be a better choice? Best regards, Ching-Yun "Xavier" Ho, Technical Artist Contact Information Mobile: (+61) 04 3335 4748 Skype ID: SpaXe85 Email: cont...@xavierho.com Website: http://xavierho.com/
-- http://mail.python.org/mailman/listinfo/python-list