Discuss / Python / 作业

作业

Topic source

单身旺2016

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

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

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

homer暹罗

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

为什么用str(n)


  • 1

Reply