fork download
  1. f = lambda s:s[~len(s)/2:]in'987654321'>s==s[::-1]
  2.  
  3. for n in xrange(10000000):
  4. if f(str(n)):
  5. print n
Success #stdin #stdout 4.12s 9024KB
stdin
Standard input is empty
stdout
1
2
3
4
5
6
7
8
9
121
232
343
454
565
676
787
898
12321
23432
34543
45654
56765
67876
78987
1234321
2345432
3456543
4567654
5678765
6789876