How to compare booleans sublists with Or operator

I’m looking to simplify this operation, as I want to be able to change the input list without modifying the code.

How can I compare the boolean sublists using the ‘Or’ operator in a more elegant way?

How about List.Flatten after your List.Contains and then Any.True

Like this?

But I want the same output that I’m having at the first image.

Welcome to the forum btw :slight_smile:

OK, I’m misunderstanding what you are trying to do.

List contains is 4 lists?
And what are you getting at List.GetItemAtIndex?

Yes, List.Contains has 4 sublists.

I’m using Get Item At Index to separate the 4 lists and then comparing them with the Or operator.

Use a Transpose so that you can check each sublist of booleans for AnyTrue.

1 Like

This is a nice example of when Dynamo is better than Python.
Was fun to Python it tho. :slight_smile:

1 Like

It’s works! Thanks a lot!