class Solution: def isPalindrome(self, x: int) -> bool: return str(x) == str(x)[::-1] def main() -> None: test = [121, -121, 10] # True, False, False s = Solution() for t in test: print(f"isPalindrome({t}) = {s.isPalindrome(t)}") if __name__ == "__main__": main()