word = input('Enter a word: ') backwards = word[::-1] if backwards == word: print('word is a palindrome') else: print('Word is not a palindrome')