Question: def find_lists_avg(list_of_lists): list_of_avgs = [] if len(list_of_lists) == 0: return None else: for l in list_of_lists: avg = float(sum(l))/len(l) list_of_avgs.append(avg) return list_of_avgs Write a function,
![def find_lists_avg(list_of_lists): list_of_avgs = [] if len(list_of_lists) == 0: return None](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66fa526c09917_13166fa526b9598f.jpg)
def find_lists_avg(list_of_lists): list_of_avgs = [] if len(list_of_lists) == 0: return None else: for l in list_of_lists: avg = float(sum(l))/len(l) list_of_avgs.append(avg)
return list_of_avgs


Write a function, find lists_avg(...), that computes the average of a list of numbers. The function accept one parameter, list_of_lists, from which you should extract each list and compute the average of the values in each list. You can assume that the values in the list are either integers or floats. The function should return a list of averages of the lists. Ex. list-of-lists [[1,2,3], [2,4], [3,3,3]] print(find_lists_avg(list_of_lists)) should output: [2.0, 3.0, 3.0]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
