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 count_letters 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). Lower-case and upper-case versions of a letter should be part of the same count. The keys of the dictionary should be upper-case 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 key-value pairs:
{'A':2,'B':2}
And no, we havent covered the isalpha function, so don't use if.
Deline a function named count _ letters that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!