class Solution(object):
def isPalindrome(self, x):
l = 1
if x < 0 :
return False
#x = 0 - x
while x / (pow(10,l)):
l += 1
#print l
a = 1
b = pow(10,l-1)
for i in range(0,l/2):
#print i,l-i-1
if x/a%10 == x/b%10:
a *= 10
b /= 10
continue
else:
return False
return True
"""
:type x: int
:rtype: bool
"""
Determine whether an integer is a palindrome. Do this without extra space.