List Combinations
George Sakkis
george.sakkis at gmail.com
Wed Mar 12 10:45:29 EDT 2008
On Mar 12, 10:18 am, Gerdus van Zyl <gerdusvan... at gmail.com> wrote:
> I have a list that looks like this:
> [['3'], ['9', '1'], ['5'], ['4'], ['2', '5', '8']]
>
> how can I get all the combinations thereof that looks like as follows:
> 3,9,5,4,2
> 3,1,5,4,2
> 3,9,5,4,5
> 3,1,5,4,5
> etc.
>
> Thank You,
> Gerdus
Search for "cartesian product" recipes.
George
More information about the Python-list
mailing list