for the problem: https://www.spoj.com/problems/TEST/14
used python for solving, but not giving output, and giving error, please help

try:
    while True:
        line = raw_input()
        if int(line) != 42:
            print(line)
        else:
            break
            # process line
except EOFError:
    pass
  • created

    Oct '19
  • last reply

    Oct '19
  • 1

    reply

  • 861

    views

  • 2

    users

  • 1

    link

raw_input() ------> python ver. <= 2.99
input() -------> python ver. >= 3.00