SIGTSTP Error

while True:
try:
t=int(input())
while(t!=0):
k,x=map(int,input().split())
print(abs(k-x))
t-=1
except:
pass

I Got SIGTSTP error in my code can anyone help me out…

Hey @nancieee_1010 :wave: ,
SIGTSTP is because your code is asking for input even if it not required.
your code work fine for the given test case but you except: part has a pass keyword which is not breaking the loop except it just skipping the loop that’s why your code gives SIGTSTP , put Break keyword in except statement and it will work fine.

1 Like