Question: Write a function named initialLetterCount that takes one parameter, wordList a list of words. Create and return a dictionary in which each initial letter
Write a function named initialLetterCount that takes one parameter, wordList — a list of words. Create and return a dictionary in which each initial letter of a word in wordList is a key and the corresponding value is the number of words in wordList that begin with that letter. The keys in the dictionary should be case-sensitive (e.g,. 'a' and 'A' are different letters).
For example, the following is correct output
horton = ['I', 'say', 'what', '1'mean','and','I' mean',' what', 'I', 'say']
print(initialLetterCount(horton))
{'I': 4, 's': 2, 'w': 2, 'm': 2, 'a': 1}
Step by Step Solution
3.47 Rating (173 Votes )
There are 3 Steps involved in it
To solve this problem we will write a Python function called initialLetterCount which takes one parameter wordList This function will return a diction... View full answer
Get step-by-step solutions from verified subject matter experts
