# Need help with replace item at index of a list

**URL:** <https://forum.dynamobim.com/t/need-help-with-replace-item-at-index-of-a-list/111077>\
**Category:** Lists-Logic\
**Tags:** civil3d\
**Created:** [July 2, 2025, 7:36pm UTC](https://forum.dynamobim.com/t/need-help-with-replace-item-at-index-of-a-list/111077 "2025-07-02T19:36:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nkiakas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nkiakas/32/168562_2.png) [@nkiakas](https://forum.dynamobim.com/u/nkiakas)\
**Post date:** [July 2, 2025, 7:36pm UTC](https://forum.dynamobim.com/t/need-help-with-replace-item-at-index-of-a-list/111077/1 "2025-07-02T19:36:59Z")

</div>

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](https://forum.dynamobim.com/uploads/short-url/pMPsKuM6E0YT6cXmZzg1Nr0LrK6.dyn) (16.3 KB)

 ![Screenshot01](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/a/3a820620cac2574ca4aa848f7a180f37400b58dd.png)

---

<div class="post-metadata">

**Author:** ![luckysurfcs](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@luckysurfcs](https://forum.dynamobim.com/u/luckysurfcs)\
**Post date:** [July 2, 2025, 10:02pm UTC](https://forum.dynamobim.com/t/need-help-with-replace-item-at-index-of-a-list/111077/2 "2025-07-02T22:02:41Z")

</div>

Hey,  
Try feeding it into a Python Script Node instead

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/a/cae96e4333da03b721c62557c94c7dea939ae67d.png)

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

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

OUT = lst

```

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [July 3, 2025, 4:31am UTC](https://forum.dynamobim.com/t/need-help-with-replace-item-at-index-of-a-list/111077/3 "2025-07-03T04:31:52Z")

</div>

clockwork works the way expected.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/0/c0d654686bf577cb6a07ea822cfa9810e3247926.png)

---

<div class="post-metadata">

**Author:** ![nkiakas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nkiakas/32/168562_2.png) [@nkiakas](https://forum.dynamobim.com/u/nkiakas)\
**Post date:** [July 26, 2025, 8:01am UTC](https://forum.dynamobim.com/t/need-help-with-replace-item-at-index-of-a-list/111077/4 "2025-07-26T08:01:20Z")

</div>

Thank you very both of you

---

<div class="post-metadata">

**Author:** ![solamour](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/solamour/32/153516_2.png) [@solamour](https://forum.dynamobim.com/u/solamour)\
**Post date:** [July 28, 2025, 4:10pm UTC](https://forum.dynamobim.com/t/need-help-with-replace-item-at-index-of-a-list/111077/5 "2025-07-28T16:10:06Z")

</div>

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 🙂

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/7/a7a0f533e5240519790f91e14ae84912abb3ef42.png)

> [Dynamo Core 3.5 Release - Dynamo BIM](https://dynamobim.org/dynamo-core-3-5-release/)

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [July 28, 2025, 5:33pm UTC](https://forum.dynamobim.com/t/need-help-with-replace-item-at-index-of-a-list/111077/6 "2025-07-28T17:33:00Z")

</div>

@solamour Thanks for the update.
