while True: line = input() if line == '0': lines.append(line) break lines.append(line)
Traceback (most recent call last): File "a.py3", line 4, in line = input() EOFError: EOF when reading a line