Basically, I would like to build a list comprehension over the "cartesian product" of two iterators. Think about the following Haskell code:

```
[(i,j) | i <- [1,2], j <- [1..4]]
```

which yields

```
[(1,1),(1,2),(1,3),(1,4),(2,1),(2,2),(2,3),(2,4)]
```

Can I obtain a similar behavior in Python in a concise way?

## Best Solution

Are you asking about this?