Read a list of booleans and change to other booleans list depending on the combination obtained

Hi Guys!
Does someone know how I can read an existing list and create another one depending on the number of “true” and “false”?.

For example, if I have 2 true and 1 false, I want dynamo to write in the list “true”, but if I have 2 “false” 1 “true”, I want dynamo to write “false”.
They needed to compare 3 lists to obtain the result and after that write the list like the original.(ex:,list1/Index0 - 3 true = true)
I tried to create something using binary numbers and “if”, but I don’t have any success because they don’t return the style of the original list. =/

Can someone help me?

IDEA:

TRY:

Hi @joaoluiz.sribeiro,

An If statement could help you.

x=="1"||x=="11"?
true:
x=="0"||x=="00"||x=="01"||x=="10"?
false:
x;
1 Like

Thanks, @Alban_de_Chasteigner!!
Works for me!! =)