判断回文数

class Solution:
    def isPalindrome(self, x):

        if str(x).startswith('-'):
            return False
        else:
            a = str(x)
            b = a[::-1]
            if a == b:
                return True
            else:
                return False
原文地址:https://www.cnblogs.com/wlj-axia/p/13071948.html