Question: Problem 3 : Write a function called first _ word that takes a list of character strings as input and returns the first element of
Problem : Write a function called firstword that takes a list of character strings as input and returns the first element of the list in alphabetical order. For
example, your function should work like this:
students Mary 'Zelda', 'Jimmy', 'Jack', 'Bartholomew', 'Gertrude'
firstwordstudents
'Bartholomew' # The result
Hint: You'll need to first sort your list in the function to accomplish this, then identify the first element. Within a function, it is a good idea to use multiple lines of
code to separate out the different steps. Just make sure all the code that belongs to the function is indented!
After you've written the function, run it by supplying the list teams to your function as an argument to test it
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
