Write a function named initialLetterCount that takes one parameter, wordList a list of words. Create and
Fantastic news! We've Found the answer you've been seeking!
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 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}
Related Book For
Essentials of Strategic Management
ISBN: 978-1260092271
1st edition
Authors: Martyn R Pitt, Dimitrios Koufopoulos
Posted Date: