Question
The function below checks if a string is a palindrome (same forward and backward, ignoring case and non-alphanumeric characters):
def is_palindrome(s):
cleaned = "".join(char for char in s if char.isalnum())
return cleaned == cleaned[::-1]
(a) Add at least two common case and two edge case doctest examples to the docstring.
(b) There is a hidden bug — the function is case-sensitive. Find and fix it.
(c) Run doctest.testmod(verbose=True) to verify all tests pass.