Discuss / Python / 作业

作业

Topic source

yayayaxs

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

def is_palidrome(n): m = int(str(n)[-1::-1]) return n == m

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


  • 1

Reply