def is_palindrome(n): r=[] while n: r.append(n%10) n=n//10 return r[:]==r[::-1] output=filter(is_palindrome,range(1,1000)) print(list(output))
Sign in to make a reply
尼玛取个昵称就这么难