Need help with replace item at index of a list

Good evening.

I am trying to replace some items of a list with other items from another list, where the indices are also in another list. As you can see from the attachments, i am not defining something proper…
Do i have to do something with the levels of the lists, or the way of lacing?
Thank you for your time

Regards
Test.dyn (16.3 KB)

Hey,
Try feeding it into a Python Script Node instead

lst = IN[0][:]  # original list
indexes = IN[1]
items = IN[2]

for i, item in zip(indexes, items):
    lst[i] = item

OUT = lst

1 Like

clockwork works the way expected.

1 Like

Thank you very both of you

Historically there has been a limitation in this node to only replace at a single index; but from Dynamo 3.5 onwards there is a new node out of the box that does exactly what you are looking for :slight_smile:

Dynamo Core 3.5 Release - Dynamo BIM

2 Likes

@solamour Thanks for the update.

2 Likes