IDNLearn.com provides a collaborative environment for finding and sharing answers. Ask any question and get a thorough, accurate answer from our community of experienced professionals.

The function below takes one parameter: a list (string_list) that contains only strings. Complete the function to return the longest string from the list. If the list is empty, return an empty string (i. E "").

Sagot :

Answer:

def find_longest_string(string_list):

   if string_list==[]:

       return ""

   else:

       return max(string_list,key=len)

Explanation:

We appreciate your contributions to this forum. Don't forget to check back for the latest answers. Keep asking, answering, and sharing useful information. Your questions deserve reliable answers. Thanks for visiting IDNLearn.com, and see you again soon for more helpful information.