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