Re: some sort of permutations...

2005-04-12 Thread Jack Diederich
On Tue, Apr 12, 2005 at 08:41:15AM -0400, Bill Mill wrote: > On Apr 12, 2005 2:37 AM, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > "Bernard A." wrote: > > > > > i'm looking for a way to have all possible length fixed n-uples from a > > > list, i think generators can help, but was not able to do it

Re: some sort of permutations...

2005-04-12 Thread Scott David Daniels
Bill Mill wrote: On Apr 12, 2005 2:37 AM, Fredrik Lundh <[EMAIL PROTECTED]> wrote: "Bernard A." wrote: i'm looking ... to have all possible length fixed n-uples from a list... ... http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/190465 And, while I'm asking that question, is there a good ref

Re: some sort of permutations...

2005-04-12 Thread Bill Mill
On Apr 12, 2005 2:37 AM, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > "Bernard A." wrote: > > > i'm looking for a way to have all possible length fixed n-uples from a > > list, i think generators can help, but was not able to do it myself, > > maybe some one could point me out to an idea to do it ?

Re: some sort of permutations...

2005-04-11 Thread Fredrik Lundh
"Bernard A." wrote: > i'm looking for a way to have all possible length fixed n-uples from a > list, i think generators can help, but was not able to do it myself, > maybe some one could point me out to an idea to do it ? did you try googling for "python permutations" ? here's the first hit:

some sort of permutations...

2005-04-11 Thread Bernard A.
hello, i'm looking for a way to have all possible length fixed n-uples from a list, i think generators can help, but was not able to do it myself, maybe some one could point me out to an idea to do it ? for example, from : l = [0, 1, 2, 3, 4] and searching for n-uples of 3, i should produce : (