In stdout solution is correct but still throwing an error? any suggestions whats the issue

def isPalindrome(x):
if x<0:
return "false"
temp=x
rev=0
while(x>0):
digit=x%10
rev=rev*10+digit
x=x//10
if temp==rev:
return "true"
else:
return "false"

x=int(input())
print(isPalindrome(x))

Comments (0)