题解 | #字符统计#
字符统计
http://www.nowcoder.com/practice/c1f9561de1e240099bdb904765da9ad0
from collections import Counter
o=Counter(input())
s=[[i,o[i]] for i in o]
s.sort(key=lambda item:(-item[1],item[0]))
for i in s:
print(i[0],end='')
o=Counter(input())
s=[[i,o[i]] for i in o]
s.sort(key=lambda item:(-item[1],item[0]))
for i in s:
print(i[0],end='')