If statements

I am working with the script below and I am trying to take the list on the right and change each false index value to the first non false value above it so that the output would be as shown on the right. I tried an if node but I don’t think this is the way to go. Any suggestions?

I am sure there is a simpler method.

Here is my attempt with nodes only: (let’s hope Vikram is back tomorrow)

Its easier with a loop like this:

1 Like

I finally got it to work. I do like your loop command @Einar_Raknes. Thnaks,