x = int(input()) list = [] for i in range(0,x): emu = (input()) list.append(emu)
for q in range(len(list)): if (list[q]!= 42): print(list[q]) else: break
It looks like this might be for TEST, except you’re expecting the first line to have the number of values. It doesn’t.