#construct the matrix
matrix = [[1, 2], [4, 3]]
#iterate over the matrix summing all elements in the row
#give those row summations into a list
#sum the list to give you the answer
ans = sum([sum(row) for row in matrix])
print(ans)
10
x = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
]
y = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
]
for i in range(3):
for j in range(3):
print(x[i][j] + y[i][j])