Culling tree branches

How to cull specific branches of a tree according to True/False pattern?
This is my approach (works on trees with rather simple structure). Is there anything else out there?

Something like this?

something like this?


Such a simple and brilliant solution.
Thank you both.

NICE! Done with 2 components (if you want to keep T or F only).

Here is a Python option. (4.7 KB)

You an also use Split tree