k=[] for num in range(100,1000): temp=num s=0 while(num>0): r=num%10 s=(s*10)+r; num=num//10 if(temp==s): k.append(s) print("Palindrome numbers between 100 and 1000 are:") for i in range(len(k)): print(k[i]) input("Press enter to exit")