Logic: How to get a list of numbers between two values

I’m trying to get a list which provides numbers between two values, a low number and a high number. In other words, I’m looking for a range between two numeric values. This is what I have. I want a list which returns “True” for indices 3 through 4. How do I achieve such a list? Does the “Or” node not work with lists?

Can you make a simple design script work?


Two things here: 1) You’re using the wrong type of OR node and 2) you really want an AND operation instead.

The node you’re using takes individual inputs, not lists. You want the list nodes (|| and &&), specifically the AND node (&&) to check which inputs in both lists are true.

As @SeanP has pointed out, you can also combine these conditional checks into one statement with DesignScript: x >= 3 && x <= 4;


That works for me with simple lists, but I don’t see how to use this approach in my example. I am an amateur at best in regards to using DesignScript.

That’s it, thank you! Good point on the AND rather than OR, I had not fully thought through the logic of my query prior to posting.
Now I understand where @SeanP was pointing; I was in need of extra help, which you provided.