def is_palindrome(n): return str(n)==str(n)[::-1] output = filter(is_palindrome, range(1, 1000)) print(list(output))
Sign in to make a reply
请叫我林小李