[연습] 코딩테스트 연습 (태그문제)
def solution(data, tags): tmp = {x[0] : 0 for x in data} for x in tags: for y in data: if x in y: tmp[y[0]] +=1 tmp_sort = sorted(tmp.items(), key= lambda x: x[1], reverse=True) answer = [x[0] for x in tmp_sort if x[1] != 0] print(answer) solution([ ["doc1", "t1", "t2", "t3"], ["doc2", "t0", "t2", "t3"], ["doc3", "t1", "t6", "t7"], ["doc4", "t1", "t2", "t4"], ["doc5", "t6", "t100", "t8"], ], ["t..