var = input('Enter the word') list1 = list(var.lower()) list2 = list(var.lower()) list2.reverse() if list1 == list2: print('%s is a palindrome'%var) else: print('%s is not a palindrome'%var)