Discuss / Python / 交个作业,优雅一行

交个作业,优雅一行

Topic source

Kasonsx

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

-- coding: utf-8 --

def is_palindrome(n): return n==int(str(n)[::-1]) output=filter(is_palindrome,range(1,1000)) print(list(output))

写的很好啊这个答案


  • 1

Reply