def isPalindrome(s): return s == s[::-1] s=input("Enter a word:") ans=isPalindrome(s) if ans: print(s, "is a palindrome") else: print(s, "is not a palindrome")