Discuss / Python / 感觉其他的小伙伴写的我都看不懂qwq

感觉其他的小伙伴写的我都看不懂qwq

Topic source

吼kk

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

def is_palindrome(n): L = list(str(n)) for i in range(len(L)): if L[i] == L[len(L) - 1 - i]: return n else: return 0

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


  • 1

Reply