• + 0 comments
    a1 = [1,2,3]
    a2 = [2,3,4]
    a3 = [1,1,1]
    
    matrix_a = [a1,a2,a3]
    
    b1 = [4,5,6]
    b2 = [7,8,9]
    b3 = [4,5,0]
    
    matrix_b = [b1,b2,b3]
    
    c1 = []
    c2 = []
    c3 = []
    
    matrix_c = [c1,c2,c3]
    
    
    
    for n in range(len(matrix_a)):
      for i in range(len(matrix_a[n])):
        matrix_c[n].append(matrix_a[n][i] - matrix_b[n][i])
    
    
    
    for n in range(len(matrix_c)):
      for i in range(len(matrix_c[n])):
        print(matrix_c[n][i])