lst = [2, 2, 2, 2] i = 0 while lst[i] != 0: i += 2