How many is "too many" with lists?
Matthew Hirsch
meh9 at cornell.edu
Tue May 2 12:48:01 EDT 2000
Generating the list is slow. I'm accessing each element with a for
loop. I was just curious.
Matt
In article <8emtqt$dsf$1 at nntp9.atl.mindspring.net>, aahz at netcom.com
(Aahz Maruch) wrote:
> In article <meh9-068C25.11551802052000 at news.cit.cornell.edu>,
> Matthew Hirsch <meh9 at cornell.edu> 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 netcom.com)
>
> Androgynous poly kinky vanilla queer het <*>
> http://www.rahul.net/aahz/
> 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