summaryrefslogtreecommitdiff
path: root/progs/a689.py
blob: 5dd684de9d8e916dc076682bef6b55a4c56d7390 (plain)
1
2
3
4
5
6
7
8
9
from collections import defaultdict 

def most_occurrences(test_list):
  temp = defaultdict(int)
  for sub in test_list:
    for wrd in sub.split():
      temp[wrd] += 1
  res = max(temp, key=temp.get)
  return (str(res))