Return True if s is a palindrome when you keep only letters and digits (a-z, A-Z, 0-9) and ignore the case. An empty result is a palindrome.
Example 1
Input:
valid_palindrome('A man, a plan, a canal: Panama')
Output:
True
Example 2
Input:
valid_palindrome('race a car')
Output:
False
0 <= len(s) <= 3 * 10**5s contains printable ASCII characters.No results yet
Run your code to check it against the examples, or submit to run every test.