[Numpy-discussion] how do I list all combinations
Wed Dec 26 15:05:22 CST 2007
Which reference manual?
René Bastian wrote:
> Le Mercredi 26 Décembre 2007 21:22, Mathew Yeates a écrit :
>> I've been looking at "fromfunction" and itertools but I'm flummoxed.
>> I have an arbitrary number of lists. I want to form all possible
>> combinations from all lists. So if
>> I want to return [["dog",1],["dog",2],["cat",1],["cat",2]]
>> It's obvious when the number of lists is not arbitrary. But what if
>> thats not known until runtime?
> In the 'Reference Manual' of Python there is an example.
>> Numpy-discussion mailing list
More information about the Numpy-discussion