Grasshopper condition /if and or/ in Python

Hello Guys

there was a need to apply several conditions if and or
function expression is not suitable for this, too large a node is obtained

decided to make such a node through python
There was a problem not to save the same structure of a data tree as through expression

Please tell me how you can implement this through a python with several conditions //if and or//

if and or.gh (19.8 KB)

Hi Foxman

I hope this help you.

My gh file :
if and or.gh (20.3 KB)

1 Like

thank you very much, NARUTO, for your help, I’m still a novice in python

is it possible to make several conditions in the python // if and // in the same structure, while preserving the structure of the tree

To the existing condition, add another example:

x=180 and y=89, 120 else 60
x=160 and y=76, 135 else 71

that there are several conditions / if /