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.
Dear User, We are grateful for your interest in the Kodingwindow Android app. We intend to soon make it available on the Google Play Store. Currently, Android versions 10 and up require manual apk installations. Would you like to get the app?