def is_palindrome(n): s = str(n) return s == s[::-1]
写的真好,评论里最简洁的代码
def ispa(n): s = str(n) return s == s[::-1]
要求用filter函数实现
想到一起了
def is_palindrome(n): return str(n)==str(n)[::-1]
Sign in to make a reply
冥河万花筒
def is_palindrome(n): s = str(n) return s == s[::-1]