# Get BooleanMask in and out list in Python Node

**URL:** <https://forum.dynamobim.com/t/get-booleanmask-in-and-out-list-in-python-node/36072>\
**Category:** DesignScript\
**Tags:** python, dynamo\
**Created:** [May 16, 2019, 3:29pm UTC](https://forum.dynamobim.com/t/get-booleanmask-in-and-out-list-in-python-node/36072 "2019-05-16T15:29:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aileen.hon](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@aileen.hon](https://forum.dynamobim.com/u/aileen.hon)\
**Post date:** [May 16, 2019, 3:29pm UTC](https://forum.dynamobim.com/t/get-booleanmask-in-and-out-list-in-python-node/36072/1 "2019-05-16T15:29:16Z")

</div>

Hi,

I’m practising and translating a script which is in visual programming into a single Python script. I’ve come so far that I applied a FilterByBooleanMask node and now I have a dictionary with two entries. But I’m having trouble “splitting” the dictionary now. So my goal is to have a new list (list\_in) and (list\_out) with the values from the dictionary.

I’ve googled standard Python methods but haven’t found anything that worked yet. Any ideas?

 ![59](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/0/d039225302ba670cb5ee1d0058af135083da4b4a.png)

This is what the current output is

---

<div class="post-metadata">

**Author:** ![M.Perez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/m.perez/32/49821_2.png) [@M.Perez](https://forum.dynamobim.com/u/M.Perez)\
**Post date:** [May 16, 2019, 3:43pm UTC](https://forum.dynamobim.com/t/get-booleanmask-in-and-out-list-in-python-node/36072/2 "2019-05-16T15:43:53Z")

</div>

You already have two lists. If you want to split them, you can add a code block with:

```
list[0];
list[1];

```

to split it in 2 paths. Or did I misunderstand your question?

I think it is not possible to make 2 outputs from a Python block, but I may be wrong.

---

<div class="post-metadata">

**Author:** ![aileen.hon](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@aileen.hon](https://forum.dynamobim.com/u/aileen.hon)\
**Post date:** [May 16, 2019, 3:48pm UTC](https://forum.dynamobim.com/t/get-booleanmask-in-and-out-list-in-python-node/36072/3 "2019-05-16T15:48:06Z")

</div>

Sorry, I didn’t explain correctly. I want to continue the Python script and use the _in List_ and the _out List_ (that are currently inside a _Dictionary_) separately so I would like to take them out of the dictionary and create a new list with them. But normal indexing doesn’t work with the dictionary

---

<div class="post-metadata">

**Author:** ![viktor\_kuzev](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/viktor_kuzev/32/48254_2.png) [@viktor\_kuzev](https://forum.dynamobim.com/u/viktor_kuzev)\
**Post date:** [May 16, 2019, 4:53pm UTC](https://forum.dynamobim.com/t/get-booleanmask-in-and-out-list-in-python-node/36072/4 "2019-05-16T16:53:05Z")

</div>

If I remember correctly FilterByBoolMask returns a dictionary with 2 keys “in” and “out”  
So to get the “in” list it should be something like Dictionary.ValueAtkey(dictionary, “in”)

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [May 16, 2019, 9:07pm UTC](https://forum.dynamobim.com/t/get-booleanmask-in-and-out-list-in-python-node/36072/5 "2019-05-16T21:07:35Z")

</div>

Hello,  
you can try this  
OUT = filtered\_dic.get(“out”), filtered\_dic.get(“in”)

---

<div class="post-metadata">

**Author:** ![ruben.romero](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ruben.romero/32/115842_2.png) [@ruben.romero](https://forum.dynamobim.com/u/ruben.romero)\
**Post date:** [May 31, 2022, 1:59pm UTC](https://forum.dynamobim.com/t/get-booleanmask-in-and-out-list-in-python-node/36072/6 "2022-05-31T13:59:09Z")

</div>

> [@aileen.hon](#):
>
> Any ideas?

```auto
dicin= filtered_list["in"]
dicout= filtered_list["out"]

```
