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 = {}

30th Aug 2022, 10:42 AM
DISHANT Kumar
DISHANT Kumar - avatar
3 Réponses
30th Aug 2022, 6:11 PM
Chris Coder
Chris Coder - avatar
+ 6
For a help will be needed language and your attempt.
30th Aug 2022, 11:01 AM
JaScript
JaScript - avatar
0
Thanks brother
31st Aug 2022, 7:49 AM
DISHANT Kumar
DISHANT Kumar - avatar