word = input('Enter a word: ') a = '' for b in word: a = b + a if a == word: print(word, 'is a palindrome') else: print(word, 'is not a palindrome')