for item in [1,2,3]: index = 0 while True: index = index + 1 print("Index:", index) print("Item:", item) print("---") if index is not 3: continue else: break print("This is never triggered, and therefore not displayed.") print("exit") exit(0)