Basically, I would like to build an understanding of the list over the "Cartesian product" of two iterators. Think of the following Haskell code :
[(i,j) | i <- [1,2], j <- [1..4]]
what gives
[(1,1),(1,2),(1,3),(1,4),(2,1),(2,2),(2,3),(2,4)]
Is it possible to get similar behavior in Python in short form?
python iterator list-comprehension
Federico A. Ramponi
source share