how to exit from a nested loop in python
for i in range(len(A.hp)):
for j in range(len(run_parameters.bits_Mod)):
req_slots[j] = math.ceil((A.T[i])
for g in Temp[i]["Available_ranges"][j]:
for s in range(g, g[-1]):
if (s+req_slots[j]-1) <= g[-1]:
if (Temp[i]['cost'][j] <= (run_parameters.PSD): ------ When this condition is true i want to break the nested loop and start from the begining
A.T[i]["Selected_MOD"] = j
I have this code. When the last "if" condition is satisfied, i want to break all the loops and start the nested loop for next i. else, the loop should continue.
can anyone help me?