LeetCode 9. Palindrome Number 回
2018-08-14 本文已影响0人
singed
将int转为str后切片比较即可 难度不高
class Solution(object):
def isPalindrome(self, x):
str(x) == str(x)[::-1]
将int转为str后切片比较即可 难度不高
class Solution(object):
def isPalindrome(self, x):
str(x) == str(x)[::-1]