# How to extract from two lists only the elements with the same index and value?

**URL:** <https://forum.dynamobim.com/t/how-to-extract-from-two-lists-only-the-elements-with-the-same-index-and-value/93195>\
**Category:** Dynamo Player\
**Tags:** revit, python, dynamo\
**Created:** [August 25, 2023, 11:22am UTC](https://forum.dynamobim.com/t/how-to-extract-from-two-lists-only-the-elements-with-the-same-index-and-value/93195 "2023-08-25T11:22:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![krzysiektoja](https://avatars.discourse-cdn.com/v4/letter/k/5fc32e/32.png) [@krzysiektoja](https://forum.dynamobim.com/u/krzysiektoja)\
**Post date:** [August 25, 2023, 11:22am UTC](https://forum.dynamobim.com/t/how-to-extract-from-two-lists-only-the-elements-with-the-same-index-and-value/93195/1 "2023-08-25T11:22:58Z")

</div>

Hi everyone,  
I need, in these two lists, to extract only the elements with the same index and value. Then, I need to select the greater value, while maintaining the original structure of the first list. I am aware that accomplishing this is straightforward in Python, but perhaps someone knows how to achieve it using nodes or simple code blocks.

From this example I need to get list like that:  
0 List  
-I need to take only 1286 but from point 3, not 0(because its index is the same as in the point.z list)  
1 List  
-1286 from point 3  
2 List  
-1286 also from point 3

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

Thanks in advance:)
