I try to iterate j over the first condition. Only if the first if-statement is not true for every j in range(5) then I want j to iterate over the next condition.
General problem:
my_list = []
for i in range(3):
for j in range(5):
if #condition == True:
#append something to my_list for only one j in range(5)
break # move on to the next i
elif #other condition == True:
#append something to my_list for only one j in range(5)
break # move on to the next i
Example:
my_list = []
for i in range(3):
for j in range(5):
if j == 3:
my_list.append(j)
break
elif j == 0:
my_list.append(j)
break
my_list
Output: [0, 0, 0]
What I want as output: [3, 3, 3]