i checked the code on Idle and it runs fine. but spoj is rejecting it as wrong solution
while True: a=int(input("enter a number")) if a==42: break else: print(a)
SOLVEDjust removed "enter a number" string and it worked