接收键盘输入的一串字符串,输出每个字符出现的个数,用字典编写计数器程序。
a = input()d = {}for i in a:if d.get(i) is None:d[i] = 1else:d[i] += 1print(d)