Your question is Palindrome Detection Coding. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
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):