Question: Write a function called avg_max that takes a list of lists (sublists may be empty) and return the average of the largest item in each

Write a function called avg_max that takes a list of lists (sublists may be empty) and return the average of the largest item in each sublist as a float. If a sublist is empty, do not consider it for the purposes of computing average. You may assume that everything inside a non-empty sublist is a number. You may assume that at least one sublist will be non-empty.
Write a function called avg max that takes a list of lists (sublists may be empty) and return the average of the largest item in each sublist as a float. If a sublist is empty, do not consider it for the purposes of computing average. You may assume that everything inside a non-empty sublist is a number. You may assume that at least one sublist will be non-empty. For example: Result Test print (avg_max (I1,2,31,141,1)) print (avg_max (II1,2,3],14,[8,1,5.0]])) 5.0 print (avg_max(I0])) 3.5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
