How to remove first and end line with cull index (or any other ways)

residence vilamoura option2 (20.3 KB)

Like attached screen shots, i want the start and end lines to be removed. maybe, because of some mistakes, they cant be worked out.
If anyone knows how to solve it, it would be appreciative.
Best, Keisuke

Here, you can use cull Index method to remove the first and last

residence vilamoura RemoveFirst& (20.1 KB)

1 Like

Dear Uddin
just following your direction and everything worked out!
Thank you.
and if you could please tell me why ①list lengh needed and②end and start point are removed just put panel(0) and merge.

Best, Keisuke

@KeisukeAikawa Cull Index Component removes the items from the list at the a given index.
So to remove the first & last item, you need the indices of those two. First Index as we know is 0, and for the last index it is the total length of the list List Length Component gives you the total count of items in the list and setting an expression of x-1 into it gets us the last item in the list.
And we use the merge component to collect them both in order and assign it to the i input of the Cull index.
Hope this clarifies your questions.


If you have the Wrap option set to True (which is the case by default) you can use the “-1” trick.

Personnaly I use the second option with two reverse, even though it has one more component I was taught it that way and cannot get to change for the first method :sweat_smile:

Dear Teddy and Uddin
Thank you for the reply!
I understood completely!