- 博客(4)
- 收藏
- 关注
原创 python计算字符串单词出现的频率按字母对键进行排序后输出
python计算字符串单词出现的频率按字母对键进行排序后输出第一次发不太熟,见谅d = {} a = input('请输入:')b = list(a.split())for i in b: d[i] = b.count(i)for a in d: print(a,':',d[a])```#以下为运行结果请输入:hello world and practice makes perfect and hello world againpractice !!1111
2021-01-22 21:00:21
6301
3
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人