# Removing all of List 2 in List 1 -- Revit Elements

**URL:** <https://forum.dynamobim.com/t/removing-all-of-list-2-in-list-1-revit-elements/105243>\
**Category:** Lists-Logic\
**Tags:** dynamo\
**Created:** [October 18, 2024, 8:28pm UTC](https://forum.dynamobim.com/t/removing-all-of-list-2-in-list-1-revit-elements/105243 "2024-10-18T20:28:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![evargas7QQQV](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@evargas7QQQV](https://forum.dynamobim.com/u/evargas7QQQV)\
**Post date:** [October 18, 2024, 8:28pm UTC](https://forum.dynamobim.com/t/removing-all-of-list-2-in-list-1-revit-elements/105243/1 "2024-10-18T20:28:08Z")

</div>

![RemoveElementsFromElementList](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/9/b97d019a7de12c990d4c6954d0ee25b7c812c6cb.png)  
I have a list of rooms. I have another list of rooms. I want the first list of rooms not to have the rooms in list two.

I tried List.FilterByBoolMask, but this doesn’t except Revit Elements. I tried creating a Python Node to remove the elements, but havign trouble with Revit Elements.

---

<div class="post-metadata">

**Author:** ![evargas7QQQV](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@evargas7QQQV](https://forum.dynamobim.com/u/evargas7QQQV)\
**Post date:** [October 18, 2024, 8:37pm UTC](https://forum.dynamobim.com/t/removing-all-of-list-2-in-list-1-revit-elements/105243/2 "2024-10-18T20:37:53Z")

</div>

![RemoveElementsFromElementListSolution](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/5/7530cad403634b2e28d6298ad6ba7815082b4802.png)

---

<div class="post-metadata">

**Author:** ![Daan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daan/32/82246_2.png) [@Daan](https://forum.dynamobim.com/u/Daan)\
**Post date:** [October 18, 2024, 10:00pm UTC](https://forum.dynamobim.com/t/removing-all-of-list-2-in-list-1-revit-elements/105243/3 "2024-10-18T22:00:16Z")

</div>

Hi @evargas7QQQV ,

Thought you might find this page nice to understand and read a bit more into these kinds of operations:

> **[Intersection (set theory)](https://en.m.wikipedia.org/wiki/Intersection_(set_theory))**
>
> In set theory, the intersection of two sets 
>   
>     
>       
> A
>       
>     
> {\\displaystyle A}
>   
> and 
>   
>     
>       
> B
> ,
>       
>     
> {\\displaystyle B,}
>   
> denoted by 
>   
>     
>       
> A
> ∩
> B
> ,
>       
>     
> {\\displaystyle A\\cap B,}
>   
> is the set containing all elements of 
>   
>     
>       
> A
>       
>     
> {\\displaystyle A}
>   
> that also belong to 
>   
>     
>       
> B
>       
>     
> {\\displaystyle B}
>   
> or equivalent In...

Under “See Also” there are also the other ones, like Intersection, Symmetric Difference and Union.
