Question: in python please Write a function called subract(listi, list2) which takes two lists of numbers as parameters and returns a new llist. Each value in
in python please
Write a function called subract(listi, list2) which takes two lists of numbers as parameters and returns a new llist. Each value in the returned list is the different between corresponding values in the parameters lists. You may assume that the lists are rectangular i.e. each row in a list has the same number of elments as all the other rows in the same list. You may also assume that the lists have at least one row each. For example: Test Result [[6, -10, 20, 0], [-19, -1, 26, 11], [12, -5, 3, -7]] list1 = [[10,9,32,16], [25,7,48,41], [29,15,12,33]] list2 = [[4,19,12,16], [44,8, 22,30], [17,20,9,40]] list3 = subtract(listi, list2) print(list)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
