[프로그래머스 Lv2] 올바른 괄호(python, 구현)
·
CodingTest/Programmers
문제 링크: https://school.programmers.co.kr/learn/courses/30/lessons/12909 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krdef solution(s): stack = [] answer = False for i in s: if i == '(': stack.append(i) else: if not stack: stack.append(i) break else: stack.pop()..