Discuss / Python / 为什么我的做法这么菜

为什么我的做法这么菜

Topic source

-- coding: utf-8 --

def is_palindrome(n): return ((n%100)%10==int(n/100)and n>100) or (n%10)==int(n/10) or n<10 output = filter(is_palindrome, range(1, 1000)) print(list(output))


  • 1

Reply