During LTTS quality engineering validation, test identifiers may contain spaces, punctuation, and mixed case. Write a function that returns whether an identifier is a palindrome after ignoring non-alphanumeric characters and letter case.
A palindrome reads identically from left to right and right to left after normalization. For example, "No lemon, no melon" is a palindrome because its normalized form is "nolemonnomelon".
Implement is_palindrome(text).
text, a string containing letters, digits, spaces, and punctuation.true when the normalized string is a palindrome, otherwise return false.Do not build a separate normalized string. Compare characters in place using two pointers.
def is_palindrome(text):