def is_palindrome(n): m = int((str(n))[::-1]) #变为字符、倒取、再变回整数 return m == n
强啊大佬!
Sign in to make a reply
向阳