Best way for permutating using multiple lists?

Dave Angel davea at ieee.org
Fri Nov 6 16:32:05 EST 2009


Michiel Overtoom wrote:
> <div class="moz-text-flowed" style="font-family: -moz-fixed">hob wrote:
>
>> any advice people?
>
> import itertools
> alt=itertools.product("def","abc","mno","mno","wxyz")
>
>
Note to the OP.  You called this permutation, but it's not. It's the 
crossproduct.  Thus itertools.product

DaveA



More information about the Python-list mailing list