Question: Anyone know how to do this using python? Define the get_longest_word) function which is passed a list of strings as a parameter. The function returns
Anyone know how to do this using python?

Define the get_longest_word) function which is passed a list of strings as a parameter. The function returns the word in the list which has the most characters (i.e., the longest word) BUT only words with six or more characters are considered. If two or more words in the list have the same number of characters as the longest word, the function should return the last word from the start of the list which has the most characters. If the parameter list is empty or if there are no words in the list with six or more characters, the function should return the empty string. For example, the following code print("1.", get_longest_word(I"Melissa", "Jessie", "Kath", "Amity" "Raeann"])) print("2.", get_longest_word(I"Jo", "Jessie", "Penelope" "Jin", "Raeann", "Pamelita"])) print("3.", get_longest_word(I"Alan", "Jess "Amity" "Rosalie", "Rosetta"])) print("4" ", " ", get-longest-word( [ "Jo", "Jai", "Jen", "Jing", "Joey", "Jess"]), " ", print("S. ", "**", get_longest word() sep) print("6.","**get_longest word( sep "") prints 1. Melissa 2. Pamelita 3. Rosetta 4. 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
