이 글은 "파이썬 알고리즘 인터뷰 (박상길 지음)"을 읽고 주관적으로 요약한 글입니다. 문제 정의 금지 단어 제외 대소문자 구분하지 않음 구두점(마침표, 쉼표 등) 무시 책에서 구현된 코드 def mostCommonWord(self, paragraph: str, banned: list[str]) -> str: words = [word for word in re.sub(r'[^\w]', ' ', paragraph) .lower().split() if word not in banned] counts = collections.Counter(words) return counts.most_common(1)[0][0] 기억해야할 기법 정규식 다시 확인 \w 같은 표현 기억이 잘 안남 리스트 컴프리헨션 활용 특정 조..