https://programmers.co.kr/learn/courses/30/lessons/64065
def solution(s):
answer = []
stacks= []
dic = {}
tmp = ''
for i in s:
if i.isdigit():
tmp+=i
else:
if tmp !='':
stacks.append(tmp)
if tmp not in dic:
dic[tmp] =1
tmp = ''
else:
dic[tmp] +=1
tmp = ''
dic = sorted(dic.items(), key = lambda x : x[1], reverse = True)
for d in dic:
answer.append(int(d[0]))
return answer