Re: Combining sets/dictionaries

2009-09-22 Thread alex23
On Sep 23, 12:44 pm, alex23 wrote: > Alfons Nonell-Canals wrote: > > finally I've solved it using a "combinatorics" library which allows to > > do this kind of things. > > If you're using a version of Python > 2.6 you might find that > itertools.combinations does what you want without requiring t

Re: Combining sets/dictionaries

2009-09-22 Thread alex23
Alfons Nonell-Canals wrote: > finally I've solved it using a "combinatorics" library which allows to > do this kind of things. If you're using a version of Python > 2.6 you might find that itertools.combinations does what you want without requiring the additional code. -- http://mail.python.org/

Re: Combining sets/dictionaries

2009-09-22 Thread Alfons Nonell-Canals
Hello, finally I've solved it using a "combinatorics" library which allows to do this kind of things. Here, here is an example: http://automatthias.wordpress.com/2007/04/28/cartesian-product-of-multiple-sets/ Thanks for your suggestions. Regards, Alfons. Carl Banks wrote: > On Sep 22, 3:

Re: Combining sets/dictionaries

2009-09-22 Thread Carl Banks
On Sep 22, 3:08 am, Alfons Nonell-Canals wrote: > Hello, > I have different sets/dictionaries/lists (whatever you want because I > can convert them easily) and I would like to combine them. I don't want > a consensus and something like it. I'd need to combine all elements of > the first one with t

Re: Combining sets/dictionaries

2009-09-22 Thread Mel
Alfons Nonell-Canals wrote: > Hello, > I have different sets/dictionaries/lists (whatever you want because I > can convert them easily) and I would like to combine them. I don't want > a consensus and something like it. I'd need to combine all elements of > the first one with the all elements of t

Re: Combining sets/dictionaries

2009-09-22 Thread Adrien
Hi, Did you try the list.update() builtin function ? Regards Peter Otten a écrit : > Alfons Nonell-Canals wrote: > >> I have different sets/dictionaries/lists (whatever you want because I >> can convert them easily) and I would like to combine them. I don't want >> a consensus and something lik

Re: Combining sets/dictionaries

2009-09-22 Thread Peter Otten
Alfons Nonell-Canals wrote: > I have different sets/dictionaries/lists (whatever you want because I > can convert them easily) and I would like to combine them. I don't want > a consensus and something like it. I'd need to combine all elements of > the first one with the all elements of the second

Combining sets/dictionaries

2009-09-22 Thread Alfons Nonell-Canals
Hello, I have different sets/dictionaries/lists (whatever you want because I can convert them easily) and I would like to combine them. I don't want a consensus and something like it. I'd need to combine all elements of the first one with the all elements of the second one and third,... the numbers