Your question is Validate Balanced Parentheses String. 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.
Given a string s consisting of parentheses (, ), {, }, [, and ], write a function to determine if the input string is valid. An input string is valid if:
def is_valid(s: str) -> bool: