Question: Deline a function named count _ letters that takes as a parameter a string and retums a dictionary that tabulates how many of each letter
Deline a function named countletters that takes as a parameter a string and retums a dictionary that tabulates how many of each letter is in that string. The string can contain characters other than letters, but only the letters should be counted. The string could even be the emply string ust II Lowercase and uppercase versions of a letter should be part of the same count. The keys of the dictionary should be uppercase letters. If a letter does not appear in the string, then it would not get added to the dictionary. For example, if the string is AaBb
then the dicionary that is returned should contain these keyvalue pairs:
::
And no we havent covered the isalpha function, so don't use if
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
