def is_palindrome(n): s = str(n) return s == s[::-1]
转换成字符串, 不需要涉及到数字的计算和比较
好简洁~
Sign in to make a reply
gylpnj
转换成字符串, 不需要涉及到数字的计算和比较