题解 | #字符统计#
字符统计
https://www.nowcoder.com/practice/c1f9561de1e240099bdb904765da9ad0
strs=input() str1=sorted(set(strs)) #https://wenku.baidu.com/view/7a0fb3e0a900b52acfc789eb172ded630b1c98b6.html?fr=sogou&_wkts_=1678803386152 附个链接,收益匪浅 ss=sorted(str1,key=lambda x:strs.count(x),reverse=True) sss="".join(ss) print(sss)