def is_loop(n): return str(n)[::-1] == str(n) and len(str(n)) % 2 def say_loop(a, b): for i in range(a, b+1): if is_loop(i): print(i)