0
I have been stuck on this problem for 3 days can anyone help me understand it. And haven't found its answer anywhere
Given a string as input, you need to output how many times each letter appears in the string. You decide to store the data in a dictionary, with the letters as the keys, and the corresponding counts as the values. Create a program to take a string as input and output a dictionary, which represents the letter count. Sample Input hello Sample Output {'h': 1, 'e': 1, 'l': 2, 'o': 1} This were i am at : text = input() words= [x for x in text] print (words) dict = {}
3 Réponses
+ 6
For a help will be needed language and your attempt.
0
Thanks brother