Share
check if number is palindrome
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
n=int(input(“Enter a number:”))
t=n
r=0
while(n>0):
d=n%10
r=r*10+d
n=n//10
if(t==r):
print(“Palindrome”)
else:
print(“Not a Palindrome”)
Leave an answer