- Python Program to check whether a given number is a palindrome.
Python Program to check whether a given number is a palindrome.
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
#Python Program to check whether a given number is a palindrome. number=int(input('Enter any number :')) temp=number reverse_num=0 while (number>0): digit=number%10 reverse_num=reverse_num*10+digit number=number//10 if (temp==reverse_num): print('The number is palindrome!') else: print('Not a palindrome!')