Given an integer x, return true
if x is a palindrome, and false
otherwise.
class Solution:
def isPalindrome(self, x: int) -> bool:
if x < 0:
return False
else:
toStr = str(x)
return toStr == toStr[::-1]