• + 0 comments

    Boring as hell ...

    Python3

    mmul = lambda m1, m2: [[sum(aij*bjk for aij, bjk in zip(ai, bk))
                            for bk in zip(*m2)] for ai in m1]
    
    a = [[1,2,3],[2,3,4],[1,1,1]]
    b = [[4,5,6],[7,8,9],[4,5,7]]
    
    for row in mmul(a, b):
        for i in row: print(i)