Your question is Validate User Input Function. 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.
The CoBank Customer Portal needs a lightweight validator for usernames before registration or profile updates. Implement a function that returns whether a proposed username satisfies all required formatting rules.
Given a string username, return True if it is valid and False otherwise. A valid username must:
Do not modify the input string. Treat uppercase and lowercase letters as valid without converting the username.
def is_valid_username(username):