An AstraZeneca data-quality utility receives a free-form study label. Determine whether the label is a palindrome after ignoring letter case and removing all non-alphanumeric characters.
A palindrome reads identically from left to right and right to left after normalization. For this problem, use Python's alphanumeric definition, so str.isalnum() determines whether a character is retained.
Implement valid_palindrome(s).
s, a string.True if the normalized string is a palindrome, otherwise return False.def valid_palindrome(s):