设置对应所需变量
word = list(input()) dictionary = dict()
利用for循环遍历列表word并进行技术,添加至字典中
for i in word:
value = word.count(i)
dictionary[i] = value
print(dictionary)

word = list(input()) dictionary = dict()
for i in word:
value = word.count(i)
dictionary[i] = value
print(dictionary)