def next_position(board, column):
    """Return the next availabe position in a column
    
    # Arguments
        board: matrix, required
        column: int (0 to 6) - required - Index of the column

    # Return
        Index (row) of availabe position

    # Exception
        IndexError: `column` argument out of range.
    """
    if column < 0 or column > 6:
        raise IndexError('Column out of range.')

    for i, value in enumerate(board[column]):
        if value == 0:
            return i