Some thougts on cartesian products

Giovanni Bajo noway at sorry.com
Sun Jan 22 11:36:01 CET 2006


Christoph Zwerschke wrote:

> Sometimes I was missing such a feature.
> What I expect as the result is the "cartesian product" of the strings.

I've been thinking of it as well. I'd like it for lists too:

>> range(3)**2
[(0,0), (0,1), (0,2), (1,0), (1,1), (1,2), (2,0), (2,1), (2,2)]

-- 
Giovanni Bajo





More information about the Python-list mailing list