# Sort lines with the same x and y coordinates

**URL:** <https://forum.dynamobim.com/t/sort-lines-with-the-same-x-and-y-coordinates/35633>\
**Category:** Lists-Logic\
**Created:** [May 6, 2019, 8:59pm UTC](https://forum.dynamobim.com/t/sort-lines-with-the-same-x-and-y-coordinates/35633 "2019-05-06T20:59:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertoruggeri](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@robertoruggeri](https://forum.dynamobim.com/u/robertoruggeri)\
**Post date:** [May 6, 2019, 8:59pm UTC](https://forum.dynamobim.com/t/sort-lines-with-the-same-x-and-y-coordinates/35633/1 "2019-05-06T20:59:13Z")

</div>

Hi everyone, I have a list made up of lines and I would like to group the lines with the same x and y coordinates.  
How can I do it? Maybe with some python scripting?

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [May 6, 2019, 9:44pm UTC](https://forum.dynamobim.com/t/sort-lines-with-the-same-x-and-y-coordinates/35633/2 "2019-05-06T21:44:42Z")

</div>

Have you tried _List.GroupByKey_?

[https://dictionary.dynamobim.com/#/Core/List/Action/GroupByKey](https://dictionary.dynamobim.com/#/Core/List/Action/GroupByKey)
