Python 统计字符串各个字符的个数

#统计字符个数

resoult={}
for i in str:
    resoult[i]=str.count(i)
print(resoult)

猜你喜欢

转载自blog.csdn.net/Yolandera/article/details/82891895