def is_palindrome(teststr): teststr = str(teststr) for item in teststr: if str.isalnum(item): continue else: teststr.replace(item,'') teststr = teststr.lower() if teststr != teststr[::-1]: return False else: return True total = 0 test_words = ["Hello World!","Radar","Mama?","Madam, I'm Adam.", "Race car!"] for word in test_words: if is_palindrome(word): total = total + 1 print (str(total)) TypeError: is_palindrome() missing 1 required positional argument: 'teststr' Not sure what it wants saw a similar question involving a dictionary but didn't see a solution Continue reading...