Discuss / Python / 练习

练习

Topic source

阿财

#1 Created at ... [Delete] [Delete and Lock User]

def is_palindrome(n):
n1=str(n)
return n1==str(n)[::-1]

返回判断n是否等于n的逆序,若等为True,filter去除逆序不相等元素


  • 1

Reply