I'm doing an assignment for an intro course in which I need to determine whether a string is a palindrome. Having trouble with this segment of the code:
def is_palindrome(letters):
if (len(letters))==0:
return True
elif len(letters)==1:
return True
elif (letters[end])==(letters[0]):
return is_palindrome(letters[(letters[0+1]):(letters[len(letters)-1])])
else:
return False