<jupyter_start><jupyter_text>2021년 10월 8일 금요일 Programmers - 올바른 괄호 (Python)  문제 : https://programmers.co.kr/learn/courses/30/lessons/12909 블로그 : https://somjang.tistory.com/entry/Programmers-%EC%98%AC%EB%B0%94%EB%A5%B8-%EA%B4%84%ED%98%B8-Python  Solution<jupyter_code>def solution(s):
    answer = True
    mystack = []
    
    for idx, bracket in enumerate(s):
        if bracket == "(":
            mystack.append(bracket)
        else:
            try:
                if mystack.pop() == "(":
                    pass
            except:
                answer = False
                break
    if len(mystack):
        answer = False

    return answer<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12645348837209303, 'fraction_numerical': 0.03924418604651163, 'mean_word_length': 2.0087336244541483, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '532646', 'license': 'MIT', 'n_tokens_mistral': 270, 'n_tokens_neox': 258, 'n_words': 40, 'path': 'DAY 501 ~ 600/DAY506_[Programmers] 올바른 괄호 (Python).ipynb', 'repo_name': 'SOMJANG/CODINGTEST_PRACTICE', 'size': '688'}