코드
from collections import Counter
from itertools import combinations
def solution(orders, course) :
result = []
for course_num in course :
counter = Counter()
for order in orders:
counter += Counter(combinations(sorted(order), course_num))
counter = counter.most_common()
result.extend(''.join(key) for key, val in counter if val > 1 and val == counter[0][1])
return sorted(result)