Shrinking value list basing on index list

Hello. I’m trying to shrink list of values to values set - basing on the index from other list. What i’m trying to achieve is shown on sketch.
I wrote simple Python script which is working -but only in python console. It is not working as a GH component.
Maybe somoene had similar problem :slight_smile: ?
ShrinkValues.gh (5.2 KB)

Set both x and y to List Access

or you could do it with native components like this

1 Like

Thank you a lot Daniel :slight_smile: .