Nov-05-2019, 03:16 PM
Hello,
Got a task to make a palindrome checker for user input now my script so far works UNLESS the first there is a cApiTal letter in it. E.g. Abba will return a negative palindrome while abba will return positive. I don't know how i can tell python to 'ignore' letter cases
Current script:
Got a task to make a palindrome checker for user input now my script so far works UNLESS the first there is a cApiTal letter in it. E.g. Abba will return a negative palindrome while abba will return positive. I don't know how i can tell python to 'ignore' letter cases
Current script:
def reverse(s): return s[::-1] def isPalindrome(s): rev = reverse(s) if (s == rev): return True return False s = str(input("Enter a string")) ans = isPalindrome(s) if ans == 1: print("Yes") s = str(input("Enter a string")) else: print("No") s = str(input("Enter a string"))