Find transpose
for i in range ( 0 , n ) : NEW_LINE INDENT for j in range ( 0 , n ) : NEW_LINE INDENT trans [ i ] [ j ] = a [ j ] [ i ] NEW_LINE DEDENT DEDENT prod = [ [ 0 for x in range ( n ) ] for y in range ( n ) ] NEW_LINE