提取回文数

来源:互联网 发布:淘宝写手兼职招聘 编辑:程序博客网 时间:2024/06/06 01:55
# -*- coding: utf-8 -*-def is_palindrome(n):    m=str(n)[::-1]    t=str(n)    return m==t#测试output = filter(is_palindrome, range(1, 1000))print(list(output))