Replace the Line Below?

How do we Replace the Line Below selected Lines in a List
BB replaces CC, EE replaces FF … etc, etc, etc.

assuming you are indentifying the “lines above” by their indexes
BB → i=9
EE → i=15
HH → i=22
it looks like you can cull items at i+1 and then use Longest List on the resulting list
(Longest List just because it looks like the last item J gets duplicated until the lists have same lengths)


replace_below.gh (15.8 KB)

Thank You @inno

  1. List item

That works for the small string, but how can it be automated for a list 1000 rows long?

@Lina can your insert every nth script be modified to REPLACE instead of insert?