def is_palindrome(num): return num == int(str(num)[::-1]) print(list(filter(is_palindrome, range(1, 1000))))
Sign in to make a reply
posroachips