Question: Write a function named max_list which takes a two-level nested list of integers, inlist, as an input, and outputs a list, outlist, such that outlist[i]

Write a function named max_list which takes a two-level nested list of integers, inlist, as an input, and outputs a list, outlist, such that outlist[i] is the maximum of all numbers in inlist[i]. You can assume that inlist and all nested lists are never empty. >>> inlist = [[1,2,3],[4,5]] > print (max_list (inlist)) [3, 5] >>> inlist [[1,2,3],[4,5], [32,3,4] >>print (max_list (inlist)) [3, 5, 32] >>> inlist [[3,4,5,2], [1,7],[8,0,-1], [2] > print (max.list (inlist)) [5, 7, 8, 2] >>> inlist - [[100] , [1 , 7] , [-8 ,-2,-1] , [2] >>print (max_list (inlist)) [100, 7, -1, 2] >>>inlistC[3,4,5,2]] >>>print (max_list (inlist)) [51
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
