word = input("enter a word ") backwards = word[::-1] if backwards == word : print("word is palindrome") else : print("word is not palindrome")