题解 | #字符统计#
字符统计
https://www.nowcoder.com/practice/c1f9561de1e240099bdb904765da9ad0
from collections import Counter str1 = input() c=Counter(str1) print("".join(sorted(sorted(c.keys()),key=lambda k:c[k],reverse=True)))
字符统计
https://www.nowcoder.com/practice/c1f9561de1e240099bdb904765da9ad0
from collections import Counter str1 = input() c=Counter(str1) print("".join(sorted(sorted(c.keys()),key=lambda k:c[k],reverse=True)))
相关推荐