1 2 3 4 5 string=input(("Enter a string:")) if(string==string[::-1]): print("The string is a palindrome") else: print("Not a palindrome")