Your question is Validate Nested API Payload Brackets. 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 ], determine whether the brackets are balanced and properly nested. Return True if every opening bracket has a matching closing bracket in the correct order; otherwise return False.
(, ), {, }, [ and ]def is_valid_payload(s):