Here is code for a python program that reads in an integer and determines whether or not it’s a palindrome.
# Python program that reads in an integer and determines whether or not it’s a palindrome
num=int(input("Enter a number:"))
temp=num
rev=0
while(num>0):
dig=num%10
rev=rev*10+dig
num=num//10
if(temp==rev):
print("The number is palindrome!")
else:
print("Not a palindrome!")
# This code is contributed by Ahmad Shafiq