A club checks every new username before it's saved.
Write two functions:
clean_username(name) removes spaces from both ends and makes the name lowercase. Then:
ValueError("username is empty")ValueError("username is too long")sign_up(names) runs clean_username on every name in order. It returns a dictionary:
"accepted": the list of cleaned names that worked"refused": the list of error messages, as text, for the ones that didn't