from sys import stdin for line in stdin: n = int(line) if n == 42: break print(n,"ok!")
1 2 10 423 11 121 45 42
1 ok! 2 ok! 10 ok! 423 ok! 11 ok! 121 ok! 45 ok!
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!