Nov-24-2020, 08:26 PM
Hi. I have simple program which checks if a string is a palindrome
def is_palindrome(i): if len(i) <= 1: return True else: if i[0] != i[len(i)-1]: return False else: return is_palindrome(i[1:len(i)-1]) print(is_palindrome("kajak"))Unfortunately, when I write a word with a capital letter the result is "false". Please help. What to do and what to add to my code so that the same text in upper or lower case will be considered "True"?