[Python] Write a function sum(a, b) that takes as parameters two…

Question Answered step-by-step [Python] Write a function sum(a, b) that takes as parameters two… [Python] Write a function sum(a, b) that takes as parameters two 2-D lists a and b, and returns a new 2-D list in which each element is the sum of the elements in the corresponding positions in the parameter lists a and b.For example:>>> a = [[1, 2, 3], [4, 5, 6>> a = [[2, 2, 2], [3, 3, 3>> c = sum(a, b) >>> print(c) [[3,4,5],[7,8,9]For simplicity, you may assume that 2-D lists a and b have the same dimensions. Don’t copy from others otherwise I will report to the coordinator.Answer should be explained properly. Computer Science Engineering & Technology Python Programming Share QuestionEmailCopy link Comments (0)