I\'m trying to write a function that adds two matrices to pass the following doctests:
>>> a = [[1, 2], [3, 4]] >>> b = [[2, 2], [2, 2]
One more solution:
map(lambda i: map(lambda x,y: x + y, matr_a[i], matr_b[i]), xrange(len(matr_a)))