Python IF/ELIF assigns first result to all list

I am tring to filter standpipes according to Pipe start and end points relation to current level (Picture1)
I am planning to use Python node to make this filter work (Picture2)
Node works without issues, but it assigns the first element result to ALL elements of the list.
I thin kthere is some Python tip i have no clue about.

Your ‘for’ statement is iterating through standPipes…which is really doing nothing.

You need to iterate through pipeStart and pipeEnd with a zip function (parallel iteration)


Thanks for answer!
I investgated what this zip() function is and tried to implement it.
But i still dont have correct result (Picture 1)

It works on my side. Can you maybe check the levels of “levels”? or add CurrentLevel[0] instead of CurrentLevel?

1 Like

Thanks a lot!!!