Question: Please solve the following problem in python. Please write a function named all_the_longest, which takes a list of strings as its argument. The function should

Please solve the following problem in python.

Please solve the following problem in python. Please write a function named

Please write a function named all_the_longest, which takes a list of strings as its argument. The function should return a new list containing the longest string in the original list. If more than one are equally long, the function should return all of the longest strings. The order of the strings in the returned list should be the same as in the original. my_list = ["first", "second", "fourth", "eleventh"] result = all_the_longest ( my_list) print ( result) # ['eleventh'] my_list = ["adele", "mark", "dorothy", "tim", "hedy", "richard"] result = all_the_longest(my_list) print(result) \# ['dorothy', 'richard']

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!