Discuss / Python / 交作业啊

交作业啊

Topic source

test_number

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

def is_palindrome(n): a=str(n) b=a[::-1] return a==b

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

print output


  • 1

Reply