Description:
Add two 3x3 matrices.
Add two 3x3 matrices.
Python Code
A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
B = [[9, 8, 7], [6, 5, 4], [3, 2, 1]]
result = [[A[i][j] + B[i][j] for j in range(3)] for i in range(3)]
for row in result:
print(row)
Expected Output
[10, 10, 10]
[10, 10, 10]
[10, 10, 10]