num=int(input("Enter a no.:")) rev=0 num1=num while num!=0: rev=rev*10+(num%10) num=num//10 if num1==rev: print(num1," is a palindrome") else: print(num1," is not a palindrome")