PenFed Credit Union needs a utility that identifies whether a member-note string is a palindrome for a data-quality rule. A string is a palindrome when its alphanumeric characters read the same forward and backward, ignoring letter case, spaces, and punctuation.
Implement is_palindrome(text) to return True when text is a palindrome under these rules. Otherwise, return False.
text, a string containing letters, digits, spaces, and punctuation.True if the filtered, case-insensitive string is a palindrome, otherwise False.def is_palindrome(text):