Swap operations
temp = mat [ i ] [ j ] NEW_LINE mat [ i ] [ j ] = mat [ startx_Y + row ] [ starty_Y + col ] NEW_LINE mat [ startx_Y + row ] [ starty_Y + col ] = temp NEW_LINE col += 1 NEW_LINE if col >= M // 2 : NEW_LINE INDENT break NEW_LINE DEDENT j += 1 NEW_LINE row += 1 NEW_LINE if row >= N // 2 : NEW_LINE break NEW_LINE i += 1 NEW_LINE