def multiply(multiplicand: list, multiplier: list) -> list:
multiplicand_row, multiplicand_col = len(<EOL>multiplicand), len(multiplicand[<NUM_LIT:0>])<EOL>multiplier_row, multiplier_col = len(multiplier), len(multiplier[<NUM_LIT:0>])<EOL>if(multiplicand_col != multiplier_row):<EOL><INDENT>raise Exception(<EOL>"<STR_LIT>")<EOL><DEDENT>result = [[<NUM_LIT:0>] * multiplier_col for i in range(multiplicand_row)]<EOL>for i in range(multiplicand_row):<EOL><INDENT>for j in range(multiplier_col):<EOL><INDENT>for k in range(len(multiplier)):<EOL><INDENT>result[i][j] += multiplicand[i][k] * multiplier[k][j]<EOL><DEDENT><DEDENT><DEDENT>return result<EOL>
:type A: List[List[int]]
:type B: List[List[int]]
:rtype: List[List[int]]