9. Palindrome Number(判断整型数字是否是回文,直接暴力即可)

Determine whether an integer is a palindrome. Do this without extra space.

 1 class Solution:
 2     def isPalindrome(self, x):
 3         """
 4         :type x: int
 5         :rtype: bool
 6         """
 7         x =str(x)
 8 
 9 
10         for i in range(int(len(x)/2)+1):
11             if(x[i]!=x[len(x)-i-1]):
12                 return False
13     
14         return True
原文地址:https://www.cnblogs.com/zle1992/p/8452811.html