Your question is Validate Palindrome Ignoring Symbols. 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.
At Stripe, you need to validate whether a user-entered string reads the same forward and backward when punctuation, spaces, and other non-alphanumeric characters are ignored. Write an algorithm that returns whether the cleaned string is a palindrome.
Implement a function that takes a single string s and returns a boolean:
s — a string containing letters, digits, spaces, and special charactersTrue if the string is a palindrome after removing all non-alphanumeric characters and ignoring letter case; otherwise Falsedef is_palindrome(s):