(m, multiplier=1)
return m
swap values along diagonal, optionally adding multiplier
swap values along diagonal, optionally adding multiplier
swap values along diagonal optionally adding multiplier
def transpose_and_multiply(m, multiplier=1):
    """swap values along diagonal, optionally adding multiplier"""
    for row in range(len(m)):
        for col in range(row + 1):
            temp = m[row][col] * multiplier
            m[row][col] = m[col][row] * multiplier
            m[col][row] = temp
    return m
def transpose_and_multiply ( m , multiplier = 1 ) : for row in range ( len ( m ) ) : for col in range ( row + 1 ) : temp = m [ row ] [ col ] * multiplier m [ row ] [ col ] = m [ col ] [ row ] * multiplier m [ col ] [ row ] = temp return m