Attempting Python list comprehension with two variable of different ranges : <p>I'm trying to generate a list quickly with content from two different arrays of size n and n/2. As an example:</p>

<pre><code>A = [70, 60, 50, 40, 30, 20, 10, 0]
B = [1, 2, 3, 4]
</code></pre>

<p>I wish to generate something like</p>

<pre><code>[(A[x], B[y]) for x in range(len(A)) for y in range(len(B))]
</code></pre>

<p>I understand the second for statement is the nested for loop after the "x" one. I'm trying to get the contents of the new array to be</p>

<pre><code>A[0], B[0]
A[1], B[1]
A[2], B[2]
A[3], B[3]
A[4], B[0]
A[5], B[1]
A[6], B[2]
A[7], B[3]
</code></pre>

<p>Could anyone point me in the right direction?</p>
