I want to create a code that will return \"true\" (if I type in a palindrome regardless of case or if there are special characters in it), and \"false\" otherwise. The code I ha
my_str = my_str.casefold()
my_str = ''.join(e for e in my_str if e.isalpha())
This should recreate my_str with only alphabetical characters, using .isalpha(). Then do the test on that. If you want to keep a record of original string, just stored the recreated version is a temporary string.