# Combining two nested lists

**URL:** <https://forum.dynamobim.com/t/combining-two-nested-lists/74227>\
**Category:** Lists-Logic\
**Tags:** python, dynamo\
**Created:** [March 10, 2022, 8:04pm UTC](https://forum.dynamobim.com/t/combining-two-nested-lists/74227 "2022-03-10T20:04:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matte](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@matte](https://forum.dynamobim.com/u/matte)\
**Post date:** [March 10, 2022, 8:04pm UTC](https://forum.dynamobim.com/t/combining-two-nested-lists/74227/1 "2022-03-10T20:04:50Z")

</div>

Hi all,

I am looking for a way insert the lists of one nested list into the other in an alternating fashion. Here is an example of what I am trying to accomplish.

 ![List Combine Test_2022-03-10_01-51-08](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/0/0015641809c4252f502a21d844349a7501d32505.png)

Most advice I have found through searching indicated a python script may be necessary to accomplish this. I am unfortunately a beginner in Dynamo and have no coding experience.

Any advice would be much appreciated! Thanks,

-Matt

---

<div class="post-metadata">

**Author:** ![solamour](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/solamour/32/153516_2.png) [@solamour](https://forum.dynamobim.com/u/solamour)\
**Post date:** [March 10, 2022, 9:59pm UTC](https://forum.dynamobim.com/t/combining-two-nested-lists/74227/2 "2022-03-10T21:59:48Z")

</div>

This should get you there out of the box! 🙂

First, you create a list from both inputs, then you transpose them (Note: This may not work for jagged lists of different lengths), then you flatten the list structure.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/4/04d58bfaff1f9504c3d5ca4f6aa075a0d4c0f5e7.jpeg)

---

<div class="post-metadata">

**Author:** ![matte](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@matte](https://forum.dynamobim.com/u/matte)\
**Post date:** [March 10, 2022, 10:20pm UTC](https://forum.dynamobim.com/t/combining-two-nested-lists/74227/3 "2022-03-10T22:20:15Z")

</div>

So much more simple than I was making it… Thanks!
