Xavier Ho wrote:
Darn it.
On Sat, Jul 18, 2009 at 8:55 AM, Dave Angel <da...@ieee.org
<mailto: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.
[snip]
Lists (and strings, tuples, dicts and sets) know how many items they
contain.
--
http://mail.python.org/mailman/listinfo/python-list