Computer Science, asked by sarthaksrivastava280, 4 months ago

Ques-26) Write a program in python to check given number is palindrome or
not.​

Answers

Answered by Abhiram1221
1

Code:

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

string = str(num)

rev_string = string[::-1]

print("The reversed number is:", rev_string)

if string == rev_string:

   print("The entered number is palindrome.")

else:

   print("The entered number is not a palindrome.")

Similar questions