#! /usr/bin/env python
count = 0
for i in range(1000,3000):
set = str (i)
if (set[::-1]) == (set[0::]):
count += 1
print(i,"count=",count)
#第二种方法
# def fn(n):
# if str(n)[::-1] == str(n):
# return True
# else:
# return False
#
# output = filter(fn,range(1000,3000))
# print("所有的回数:",list(output))