Discuss / Python / 作业

作业

Topic source

大熊Cody

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

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

output = filter(is_palindrome,range(1,10000))
print(list(output))

  • 1

Reply