Question: count _ by _ first ( ) This function should accept a parameter named words, which is expected to contain a list of strings representing

count_by_first()
This function should accept a parameter named words, which is expected to contain a list of strings representing words.
The function should determine the number of strings in words with each possible starting letter and display the results.
The steps performed by this function are very similar to those described in the count_by_length() function. The
main difference is that you will be using the first characters of strings in words as keys in count_dict rather than the
length of the string. Note that if my_string is a string, then you can access the first character of my_string using
my_string[0].
Print the results in the format shown below. The x symbols should be replaced with letters and the ### symbols should
be replaced with word counts. The dashed line should be 16 characters long. Allot 12 characters for the word column
and 4 characters for the count column. The word column should be left-aligned and the count column should be right-
aligned. The desired alignments can be obtained using f-strings.
The rows in your output should be arranged so that the letter column is in increasing order from a to z.
This function should not return any value.
Instructions for the Notebook
Any set of instructions you see in this document with an orange bar to the left will indicate a place where you should create
a markdown cell. If no instructions are provided regarding formatting, then the text should be unformatted.
Any set of instructions you see with a blue bar to the left will provide instructions for creating a single code cell.
 count_by_first() This function should accept a parameter named words, which is

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 Databases Questions!