PALIN in practice

this is my code what is wrong with it its showing wrong but its working in jupyter notebook

def rev(n):
a=0
while(n>0):
a=(a*10)+n%10
n=n//10
return(a)

t=int(input(“enter the number of test cases”))
for i in range(t):
num=int(input())
for j in range(num,10000000000000000000000000000000000000000000000000000000000000):
if(rev(j)==j):
print(rev(j))
break