# Python for with sublists

**URL:** <https://forum.dynamobim.com/t/python-for-with-sublists/79984>\
**Category:** Lists-Logic\
**Tags:** python\
**Created:** [August 17, 2022, 11:33am UTC](https://forum.dynamobim.com/t/python-for-with-sublists/79984 "2022-08-17T11:33:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JMCiller](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jmciller/32/180272_2.png) [@JMCiller](https://forum.dynamobim.com/u/JMCiller)\
**Post date:** [August 17, 2022, 11:33am UTC](https://forum.dynamobim.com/t/python-for-with-sublists/79984/1 "2022-08-17T11:33:31Z")

</div>

Hello everyone,

I am trying to execute some operations with Python nodes and inputs composed of sublists within Revit. Please find attached a screenshot of the approach I am behind and how I want to get the outcome (highlighted in red).

You will notice that Python is not giving me, as outcome, the same list-structure as I want.

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

---

<div class="post-metadata">

**Author:** ![JMCiller](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jmciller/32/180272_2.png) [@JMCiller](https://forum.dynamobim.com/u/JMCiller)\
**Post date:** [August 17, 2022, 12:00pm UTC](https://forum.dynamobim.com/t/python-for-with-sublists/79984/2 "2022-08-17T12:00:16Z")

</div>

Ok I sorted it out.

I post the solution just in case someone has the same query:

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