data-structures
Write a function solution(s) that returns True if the string s contains only valid, balanced parentheses (), brackets [], and braces {}.
Example
solution("()") → True
solution("()[]{}") → True
solution("(]") → False
solution("([)]") → False
solution.py
💡 Tip: Press Ctrl+Enter to run