python实战练习:统计单词中各字母出现的频次

 

 

d = { }

for i in input():
    d[i] = d.get(i, 0) + 1


print(d)

 

posted @ 2023-08-13 20:28  limalove  阅读(42)  评论(0)    收藏  举报