Writing over list with another list, with python

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? :slight_smile:

@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 

1 Like

Yes, thank you :slight_smile:

1 Like