Discuss / Python / 从评论区大佬拿的代码,简直了

从评论区大佬拿的代码,简直了

Topic source

岁羽谌谌

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

def is_palindrome(n):

    num = str(n)

    return num == num[::-1]

print(list(filter(is_palindrome,[12121,123,145,414])))


  • 1

Reply