<p>Basically, I would like to build a list comprehension over the "cartesian product" of two iterators. Think about the following <a href="http://www.haskell.org/haskellwiki/List_comprehension" rel="noreferrer">Haskell code</a>:</p>

<pre><code>[(i,j) | i &lt;- [1,2], j &lt;- [1..4]]
</code></pre>

<p>which yields</p>

<pre><code>[(1,1),(1,2),(1,3),(1,4),(2,1),(2,2),(2,3),(2,4)]
</code></pre>

<p>Can I obtain a similar behavior in Python in a concise way?</p>

Are you asking about this?
```
```
[ (i,j) for i in range(1,3) for j in range(1,5) ]
```
```