example1 = "radar" example2 = "tacocat" example3 = "madamimadam" example4 = "anna" def isPalindrome(phrase): if len(phrase)<=1: return True first = phrase[0] last = phrase[-1] if first==last: return isPalindrome( phrase[1:-1]) else: return False