Python Program to Check Palindrome Number

Here you will get python program to check palindrome number.

A number is said to be palindrome if it is equal to its reverse. For example 121, 555, etc are palindrome while 124, 367, etc are not.

Python Program to Check Palindrome Number

num = int(input("enter a number: "))

temp = num
rev = 0

while temp != 0:
	rev = (rev * 10) + (temp % 10)
	temp = temp // 10

if num == rev:
	print("number is palindrome")
else:
	print("number is not palindrome")

Output

enter a number: 12321
number is palindrome

Video Tutorial


Comment below if you have any queries regarding python palindrome number program.

8 thoughts on “Python Program to Check Palindrome Number”

Leave a Comment

Your email address will not be published. Required fields are marked *