如题所述
a = input("请输入字符串:")b = list(a.lower()) #将输入的字符全部转换为小写字母c = {} #建立一个空字典for i in b: #for循环遍历出结果 c[i] = b.count(i)print(c)
输出结果: