If I were to narrow down my primary issue it is here.
If we assume that test is a list with the values ('1','2','3','4'), I want it to print the 1 twice and print the 3 four times. x and y are both integers with the value 0.
However it is only printing both 1 and 3 twice each.
If we assume the values of test are ('1','5','2','3') then the code will print '1' four times and stop.
If we assume that test is a list with the values ('1','2','3','4'), I want it to print the 1 twice and print the 3 four times. x and y are both integers with the value 0.
However it is only printing both 1 and 3 twice each.
If we assume the values of test are ('1','5','2','3') then the code will print '1' four times and stop.
for run in test: if x < test[y + 1]: print ("Item " + str(test[y])) x = x + 1 if x == test[y + 1]: print("Next Item") y = y + 2 x = int(0) if y == len(test): break
while dad_has_cigs == True: happiness = True if dad_has_cigs == False: print("Dad come home!") happiness = not happiness break