# Lists of Boolean

**URL:** <https://forum.dynamobim.com/t/lists-of-boolean/68108>\
**Category:** Revit\
**Tags:** revit, dynamo\
**Created:** [September 11, 2021, 5:17pm UTC](https://forum.dynamobim.com/t/lists-of-boolean/68108 "2021-09-11T17:17:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TCKEAHY](https://avatars.discourse-cdn.com/v4/letter/t/7993a0/32.png) [@TCKEAHY](https://forum.dynamobim.com/u/TCKEAHY)\
**Post date:** [September 11, 2021, 5:17pm UTC](https://forum.dynamobim.com/t/lists-of-boolean/68108/1 "2021-09-11T17:17:24Z")

</div>

Greeting. I am working on a task that need to filter from 3 lists of data.

The 3 lists of data are same in structure while contains different boolean results. What I try is I would like to combine the boolean, and changes the results into “True” if all the boolean are “False” in those 3 lists.

Below as a example

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/a/aa080fdb25926d240e64563375f712a58308c149.png)

What I want is to generate results as:  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/d/0dde943c8986f37fb975a957b1bd827faece6b91.png)

It would be great if anyone have the solution

---

<div class="post-metadata">

**Author:** ![Francois\_Labonne](https://avatars.discourse-cdn.com/v4/letter/f/bcef8e/32.png) [@Francois\_Labonne](https://forum.dynamobim.com/u/Francois_Labonne)\
**Post date:** [September 11, 2021, 5:55pm UTC](https://forum.dynamobim.com/t/lists-of-boolean/68108/2 "2021-09-11T17:55:02Z")

</div>

Hi @TCKEAHY !  
Is that what you are looking for ?

 ![bool](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/b/8b7b3c222e92208e84149668230ee0a92274ee5c.png)

---

<div class="post-metadata">

**Author:** ![AmolShah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/amolshah/32/103244_2.png) [@AmolShah](https://forum.dynamobim.com/u/AmolShah)\
**Post date:** [September 11, 2021, 6:11pm UTC](https://forum.dynamobim.com/t/lists-of-boolean/68108/3 "2021-09-11T18:11:50Z")

</div>

@TCKEAHY

 ![Home_2021-09-11_11-11-24](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/7/17d8bdb046471c7ffbc28cad13711e2ec2f74a72.png)

---

<div class="post-metadata">

**Author:** ![TCKEAHY](https://avatars.discourse-cdn.com/v4/letter/t/7993a0/32.png) [@TCKEAHY](https://forum.dynamobim.com/u/TCKEAHY)\
**Post date:** [September 12, 2021, 3:16am UTC](https://forum.dynamobim.com/t/lists-of-boolean/68108/4 "2021-09-12T03:16:04Z")

</div>

@Francois_Labonne @AmolShah

Thanks you two. Both succeed.

But there is a issue raised: after I use “list.CountTrue” or “List.AllFalse”, the last part of Empty List is not counted. As I need the correct number ordering, is there any way to reserve those parts in list?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/7/7723af18c85f3e7be3ea46b31d8aed81f58d06ae.png)

---

<div class="post-metadata">

**Author:** ![AmolShah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/amolshah/32/103244_2.png) [@AmolShah](https://forum.dynamobim.com/u/AmolShah)\
**Post date:** [September 12, 2021, 4:01am UTC](https://forum.dynamobim.com/t/lists-of-boolean/68108/5 "2021-09-12T04:01:36Z")

</div>

@TCKEAHY Try this Python solution:

 ![Home_2021-09-11_09-00-44](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/c/cca891cb597dafd39074dab2ffcd884bc491be40.png)

```auto
OUT = [[not any(lst) for lst in lsts] if lsts else None for lsts in IN[0]]

```
