# Writing over list with another list, with python

**URL:** <https://forum.dynamobim.com/t/writing-over-list-with-another-list-with-python/37651>\
**Category:** Revit\
**Tags:** python, dynamo\
**Created:** [June 27, 2019, 2:08am UTC](https://forum.dynamobim.com/t/writing-over-list-with-another-list-with-python/37651 "2019-06-27T02:08:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![notkssy](https://avatars.discourse-cdn.com/v4/letter/n/6de8d8/32.png) [@notkssy](https://forum.dynamobim.com/u/notkssy)\
**Post date:** [June 27, 2019, 2:08am UTC](https://forum.dynamobim.com/t/writing-over-list-with-another-list-with-python/37651/1 "2019-06-27T02:08:17Z")

</div>

![Captureaaa](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/5/857b0e6a4c14a6e5c797b637112bdeb98d91fe79.png)

Hello, very very new to Dynamo and Python. I know this should be a very easy script haha. I am trying to replace the empty value on the first list, with the corresponding index value on the second list. Could anyone help me out with this? 🙂

---

<div class="post-metadata">

**Author:** ![salvatoredragotta](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/salvatoredragotta/32/10078_2.png) [@salvatoredragotta](https://forum.dynamobim.com/u/salvatoredragotta)\
**Post date:** [June 27, 2019, 2:22am UTC](https://forum.dynamobim.com/t/writing-over-list-with-another-list-with-python/37651/2 "2019-06-27T02:22:32Z")

</div>

@notkssy Try the following

```
data = IN[0]
replac = IN[1]
for ind , (item1 , item2) in enumerate (zip (data , replac )):
	if item1 == "" :
		data[ind] = replac[ind]
		
OUT = data 

```

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

---

<div class="post-metadata">

**Author:** ![notkssy](https://avatars.discourse-cdn.com/v4/letter/n/6de8d8/32.png) [@notkssy](https://forum.dynamobim.com/u/notkssy)\
**Post date:** [June 27, 2019, 2:30am UTC](https://forum.dynamobim.com/t/writing-over-list-with-another-list-with-python/37651/3 "2019-06-27T02:30:40Z")

</div>

> [@salvatoredragotta](#):
>
> data = IN[0] replac = IN[1] for ind , (item1 , item2) in enumerate (zip (data , replac )): if item1 == “” : data[ind] = replac[ind] OUT = data

Yes, thank you 🙂
