I have typically an outer loop with an inner loop in it. Now I would like to modify the code that way that in some situation the outer loop shall not be executed but just the inner loop. There are no data need from outer loop in the inner loop.
for i in list_a:
# do sth in list_a
for j in list_b:
#do sth in list_b
Could this be done in ONE construct or shall i write two different loop constructs like:
if (conditionA):
for i in list_a:
# do sth in list_a
for j in list_b:
#do sth in list_b
if (conditionB):
for j in list_b:
#do sth in list_b