What is the best way to obtain every possible combination within multiple ranges in Python?
<p>Suppose I have the following code to collect all the possible combinations.</p>

<pre><code>abArray = []
for a in range(minA, maxA, aStep):
  for b in range(minB, maxB, bStep):
    if a &lt; b: continue
    abArray.append((a,b))
</code></pre>

<p>Is there a more efficient way to store all possible combinations with a condition rather than using nested for loops? </p>
