"""
统计字符串中每个字符的个数
"""
#判断字符串不能为空
flag = True
while flag:
s = input("请输入字符串:")
if s != "":
flag = False
d = {s[0]: 0}
for i in s:
lenth = 1
for key in list(d.keys()):
if i == key:
d[key] = d[key]+1
break
elif lenth == len(d):
d[i] = 1
lenth += 1
print(d)