Amazon DSP may process compact labels for campaign events and creative metadata. Given a string, determine whether its characters can be rearranged to form a palindrome.
You may reorder characters arbitrarily, but you may not add, remove, or modify any character. Treat uppercase and lowercase letters as different characters, and count spaces and punctuation exactly as provided.
Implement can_form_palindrome(s), where s is a string. Return True if some permutation of s is a palindrome; otherwise, return False. An empty string is considered valid because it is already a palindrome.
def can_form_palindrome(s):