###### tags: `leetcode` # 819. Most Common Word ```python= class Solution: def mostCommonWord(self, paragraph: str, banned: List[str]) -> str: banset = set(banned) for c in "!?',;.": paragraph = paragraph.replace(c, " ") print(paragraph) count = collections.Counter( word for word in paragraph.lower().split()) print(count) ans, best = '', 0 for word in count: if count[word] > best and word not in banset: ans, best = word, count[word] return ans ```