class Solution: def isPalindrome(self, x: int) -> bool: x_str=str(x) x_str_len=len(x_str) if x_str_len==1: return True count=0 for i in range(x_str_len//2): if x_str[i]==x_str[x_str_len-i-1]: count+=1 if count==x_str_len//2: return True else: return False