nam1 = (input('Enter a word: ')) nam2 = nam1 [::-1] if nam1 == nam2: print(nam1 ,'is a palindrome') else: print(nam1 ,'is not a pailndrome')