Format badge name

Write codeEasy12 min

Your task

Conference badges print whatever attendees typed into the registration form. Clean it up: given a name that may have leading, trailing, or repeated spaces and arbitrary letter casing, return the name with words separated by single spaces, each word starting with an uppercase letter followed by lowercase. Return an empty string if there are no words at all. For example, ' aDa LOVELACE ' becomes 'Ada Lovelace'.

Examples

badge_name(raw: str) -> str
Example 1
Inputbadge_name(" aDa LOVELACE ")
Output"Ada Lovelace"