Write efficient code to determine whether a given string is a palindrome, handling single-word and multi-word inputs with whitespace and punctuation. Treat uppercase and lowercase letters as equivalent, and ignore all non-alphanumeric characters. Implement is_palindrome(s), accepting a string and returning a boolean. The input contains ASCII letters, digits, whitespace, and punctuation.
def is_palindrome(s):