1 #!/usr/bin/env python3 2 def is_palindrome(n): 3 return str(n) == str(n)[::-1] 4 output = filter(is_palindrome, range(1,1000)) 5 print (list(output))
Sign in to make a reply
我要吃白菜网