Discuss / Python / 作业

作业

Topic source

-- coding: utf-8 --

def is_palindrome(n): s=str(n) s_reverse=s[::-1] return s == s_reverse output = filter(is_palindrome, range(1, 1000)) print(list(output))


  • 1

Reply