How many is "too many" with lists?

Matthew Hirsch meh9 at
Tue May 2 18:48:01 CEST 2000

Generating the list is slow.  I'm accessing each element with a for 
loop.  I was just curious.


In article <8emtqt$dsf$1 at>, aahz at 
(Aahz Maruch) wrote:

> In article <meh9-068C25.11551802052000 at>,
> Matthew Hirsch  <meh9 at> wrote:
> >
> >I'm building a list of lists each holding a combination of nCk where n 
> >is the total number of numbers and k is the number you are choosing.  
> >For example, I have 27 numbers, 0-26.  Looking at all combinations of 6 
> >taken from this sample produces 27!/(27-6)!6! =296010 different 
> >combinations stored in the original list.
> So what's slow?  Generating the list or manipulating the list after it's
> created?
> --
>                       --- 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