题解 | #使用字典计数#

使用字典计数

https://www.nowcoder.com/practice/74f7e7f2344f4754bc56d862838cbfc3

'''from collections import Counter
text=input()
#result=Counter(text)
#print(result)'''

text=input()
dict_1={}
for i in text:
    if i in dict_1:
        dict_1[i]+=1
    else:
        dict_1[i]=1
print(dict_1)

全部评论

相关推荐

不愿透露姓名的神秘牛友
今天 17:24
点赞 评论 收藏
分享
一表renzha:不是你说是南通我都没往那方面想,人家真是想表达那个意思吗?
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务