Palindrome Number
https://leetcode.com/problems/palindrome-number
Given an integer x, return true if x is palindrome integer.
An integer is a palindrome when it reads the same backward as forward.
For example,
121is a palindrome while123is not.
class Solution(object):
def isPalindrome(self, x):
"""
:type x: int
:rtype: bool
"""
temp = str(x)
temp2 = str(x)
temp2 = temp2[::-1]
if temp == temp2:
return True
else:
return False