now you have a dictionary with a count of letters.
create another empty dictionary.
create a for loop for key(old), value(old) of the dictionary you created
if the value(old) is a key in the new dictionary
append the key(old) to the key(new)
else
set the key(new) to a list with the value(old) inside.
it makes sense to me but might not to you basically you are flipping the key, & values between dictionary's and storing the values in a list.
create another empty dictionary.
create a for loop for key(old), value(old) of the dictionary you created
if the value(old) is a key in the new dictionary
append the key(old) to the key(new)
else
set the key(new) to a list with the value(old) inside.
it makes sense to me but might not to you basically you are flipping the key, & values between dictionary's and storing the values in a list.