word = input("Enter a word ") rev = word[::-1] if rev == word: print (word, "is a palindrome") else: print(word, "is not a palindrome")