How many is "too many" with lists?

Aahz Maruch aahz at
Tue May 2 14:03:33 EDT 2000

In article <meh9-9A73FA.12480102052000 at>,
Matthew Hirsch  <meh9 at> wrote:
>Generating the list is slow.  I'm accessing each element with a for 
>loop.  I was just curious.

In that case, I would say your algorithm for generating combinations is
probably slow.  For comparison purposes, try the following code:

l = []
for i in range(25000):
                      --- Aahz (Copyright 2000 by aahz at

Androgynous poly kinky vanilla queer het    <*>
Hugs and backrubs -- I break Rule 6

"Laws that restrict speech are an abomination for a simple reason.
They're like a poison gas; they seem to be a good weapon to vanquish
your enemy, but the wind has a way of shifting."  -- Ira Glasser

More information about the Python-list mailing list