pairwise crossproduct in Python?
Posted
by user248237
on Stack Overflow
See other posts from Stack Overflow
or by user248237
Published on 2010-03-29T21:27:38Z
Indexed on
2010/03/29
21:33 UTC
Read the original article
Hit count: 423
how can I get the list of cross product pairs from a list of arbitrarily long lists in python? e.g.
a = [1,2,3]
b = [4,5,6]
crossproduct(a,b) should yield [[1,4], [1, 5], [1,6], ...]
thanks.
© Stack Overflow or respective owner