Discuss / Python / 看看这个

看看这个

Topic source

翁岚敏

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

使用sorted

def is_palindrome(n): return sorted(str(n),reverse=True)==list(str(n)) output = filter(is_palindrome,range(1,1000)) print(list(output))


  • 1

Reply