Get values from list <=-30 and => 30


From a list i want to retrieve the values <=-30 and seperate the values => 30

list look likes

so i want 1 list with 45 and 90
and another list with -39 and -55

I have no dynamo right now.

Thanks Edwin.

Hello Edwin,
You could do this:

Hello T_Pover,

Thank you very much however i tought that i can work on from here … sadly not.
I must not change te order from the list so item 0 must be on top and if the value is false set it to 0 (zero).

i.e. from above
0 (false set value to 0)
0 (false set value to 0)
45 (true get value)
0 (false set value to 0)
0 (false set value to 0)
90 (true get value)
0 (false set value to 0)

Thanks Edwin

So which rule is true?
Both your posts are totally different.

If you want to do this without Python, you can use ReplaceByCondition:


The another way is using DesignScript Code.

1 Like

hey , i have similar question , there’s a way to match value Beethoven two numbers?

You are absolutely right but i mentioned that i tought i could work from there…

I read a lot about the nodes and what i can do with them, the dictionary is very helpfull too but when you search for string or index you miss the replace by condition node.

thanks for your answers.

@raber95 Yes you can do that just copy paste below code in Code Block node and pass your list for X.

30<x && x<60;

You can refer to the below image as well for better understanding.

Do let me know if this doesn’t work.


an associative IF one-liner might serve you better in your example:

After all, this is exactly the use case it was modified for with the 0.8 release :slight_smile:

1 Like

thx, that’s work :slight_smile: