class Solution: def isPalindrome(self, x: int) -> bool: s = str(x) size = int(len(s)) for i in range(int(size/2)): if s[i] != s[-i-1]: return False return True def main(): s = Solution() print(s.isPalindrome(121)) # True print(s.isPalindrome(-121)) # False print(s.isPalindrome(10)) # False if __name__ == '__main__': main()