# # check for palindromes # def palin(s): # base case: empty string if s == "": return True # recursive case # 1. see if the first and last letter # are the same; if not, return False if s[0] != s[-1]: return False # 2. Now return whether the middle part # is a palindrome return palin(s[1:-1])