(self, A, B)
return C
:type A: List[List[int]]
    :type B: List[List[int]]
    :rtype: List[List[int]]
:type A: List[List[int]]
    :type B: List[List[int]]
    :rtype: List[List[int]]
: type A : List [ List [ int ]] : type B : List [ List [ int ]] : rtype : List [ List [ int ]]
def multiply(self, A, B):
    """
    :type A: List[List[int]]
    :type B: List[List[int]]
    :rtype: List[List[int]]
    """
    if A is None or B is None: return None
    m, n, l = len(A), len(A[0]), len(B[0])
    if len(B) != n:
        raise Exception("A's column number must be equal to B's row number.")
    C = [[0 for _ in range(l)] for _ in range(m)]
    for i, row in enumerate(A):
        for k, eleA in enumerate(row):
            if eleA:
                for j, eleB in enumerate(B[k]):
                    if eleB: C[i][j] += eleA * eleB
    return C
def multiply ( self , A , B ) : if A is None or B is None : return None m , n , l = len ( A ) , len ( A [ 0 ] ) , len ( B [ 0 ] ) if len ( B ) != n : raise Exception ( "A's column number must be equal to B's row number." ) C = [ [ 0 for _ in range ( l ) ] for _ in range ( m ) ] for i , row in enumerate ( A ) : for k , eleA in enumerate ( row ) : if eleA : for j , eleB in enumerate ( B [ k ] ) : if eleB : C [ i ] [ j ] += eleA * eleB return C