0
Letter Counter
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}
1 Antwort
+ 3
Please, always search before posting new questions. It helps the community in reducing duplicated questions.
https://www.sololearn.com/Discuss/2694885/?ref=app
https://www.sololearn.com/Discuss/2822424/?ref=app
https://www.sololearn.com/Discuss/2701658/?ref=app
https://www.sololearn.com/Discuss/3030858/?ref=app