兄弟們
就算浸水桶
咱們的手還是不能停下
一定要繼續刷題 繼續捲
水桶絕對不是不想刷題的理由
def uncommonFromSentences(self, s1: str, s2: str) -> List[str]:
cnt = defaultdict(int)
for w in s1.split(' '):
cnt[w] += 1
for w in s2.split(' '):
cnt[w] += 1
ans = []
for k, v in cnt.items():
if v==1:
ans.append(k)
return ans