Python Program to Check for Palindrome

Here we have a Python Program to Check whether the user has entered a value which is Palindrome

In this program first we ask the user to enter value. Then we Reverse the User Input and check that with the original input.

If both of them are same then the value entered by the user is Palindrome else it is not a Palindrome.

Example Python Program to Check for Palindrome

1 value  = input("Enter the String to check for palindrome : ")
2 
3 reverseval = value[::-1]
4 
5 if value == reverseval :
6      print("Yes it is palindrome")
7 else:
8      print("No it is Not a palindrome")

Watch this video to learn how this works