aspen138 : 【字典】2852. 统计字母频率
2 年,11 月前
s = input ()
cnt = 0
d = dict ()
for i in s :
if i . isalpha () :
cnt += 1
if i not in d :
d [ i ]= 1
else :
d [ i ]+= 1
d = sorted ( d . items (), key = lambda
...查看全文