Your question is String Palindrome With Cleanup. 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.
Meta Logistics Route Planner receives route labels containing spaces, punctuation, and special characters. Write a function that determines whether a label is a palindrome after removing every non-alphanumeric character and ignoring letter case.
Implement is_palindrome(text), where text is a string. Return True if the normalized text reads identically from left to right and right to left; otherwise, return False. Normalization removes characters for which str.isalnum() is false and converts remaining letters to lowercase. An empty normalized string is considered a palindrome.
def is_palindrome(text):