fork download
  1. import sys
  2. for x in sys.stdin:
  3. x = x.strip()
  4. if x != "42": print(x)
  5. else: break
Success #stdin #stdout 0.02s 27712KB
stdin
1
2
3
42
5
stdout
1
2
3