i already found the solution
s= input("input string: ")
for n in s:
print({n:s.count(n)})
output :
input string: chocolate coco
{'c': 4} {'h': 1} {'o': 4} {'c': 4} {'o': 4} {'l': 1} {'a': 1} {'t': 1} {'e': 1} {' ': 1} {'c': 4} {'o': 4} {'c': 4} {'o': 4}
but how i can make the output doesnt repeat the alphabet. i want to have the output to be like this :
{'c': 4} {'h': 1} {'o': 4} {'c': 4} {'o': 4} {'l': 1} {'a': 1} {'t': 1} {'e': 1} {' ': 1}