Suppose I have the following code to collect all the possible combinations.
abArray = []
for a in range(minA, maxA, aStep):
for b in range(minB, maxB, bStep):
if a < b: continue
abArray.append((a,b))
Is there a more efficient way to store all possible combinations with a condition rather than using nested for loops?
I think you’re looking for
itertools.product: