Your question is Balanced Parentheses String Validation. 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 containing only the characters (, ), {, }, [ and ], return true if the string is balanced and false otherwise. A string is balanced if every opening bracket has a matching closing bracket of the same type and the pairs are properly nested.
(, ), {, }, [ and ]def is_balanced(s):