<doocs>1329.Sort the Matrix Diagonally_1.py
def diagonalSort( mat: List[List[int]]) -> List[List[int]]:
    m, n = len(mat), len(mat[0])
    for k in range(min(m, n) - 1):
        for i in range(m - 1):
            for j in range(n - 1):
                if mat[i][j] > mat[i + 1][j + 1]:
                    mat[i][j], mat[i + 1][j + 1] = mat[i + 1][j + 1], mat[i][j]
    return mat
def sample_funcname ( var_0 : List [ List [ int ] ] ) -> List [ List [ int ] ] :
    var_4 , var_6 = len ( var_0 ) , len ( var_0 [ 0 ] )
    for var_10 in range ( min ( var_4 , var_6 ) - 1 ) :
        for var_11 in range ( var_4 - 1 ) :
            for var_12 in range ( var_6 - 1 ) :
                if var_0 [ var_11 ] [ var_12 ] > var_0 [ var_11 + 1 ] [ var_12 + 1 ] :
                    var_0 [ var_11 ] [ var_12 ] , var_0 [ var_11 + 1 ] [ var_12 + 1 ] = var_0 [ var_11 + 1 ] [ var_12 + 1 ] , var_0 [ var_11 ] [ var_12 ]
    return var_0
