Python program to check whether a given number is a palindrome
kw.py
print("____________________________________________")print("Program to check number is palindrome or not")print("____________________________________________")n=int(input("Enter the number "))temp=nr=0while(n>0):r=(r*10)+n%10n=n//10print("Reverse number is",r)if(temp==r):print(temp,"is palindrome")else:print(temp,"is not palindrome")print("____________________________________________")
Output
kodingwindow@kw:~$ python3 kw.py
____________________________________________
Program to check number is palindrome or not
____________________________________________
Enter the number 100010001
Reverse number is 100010001
100010001 is palindrome
____________________________________________
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.