# XYZ List -Points

**URL:** <https://forum.dynamobim.com/t/xyz-list-points/65166>\
**Category:** Lists-Logic\
**Tags:** python\
**Created:** [June 15, 2021, 3:04pm UTC](https://forum.dynamobim.com/t/xyz-list-points/65166 "2021-06-15T15:04:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![s258085](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@s258085](https://forum.dynamobim.com/u/s258085)\
**Post date:** [June 15, 2021, 3:04pm UTC](https://forum.dynamobim.com/t/xyz-list-points/65166/1 "2021-06-15T15:04:10Z")

</div>

Hello everyone,  
This might be a really stupid question, but I have zero experience with python.  
I am trying to convert a some lists of points into XYZ. I got this python script from the forum and it works perfect for a single point list. I want it to work for several lists of point. Can somebody help me? And also recommend me some videos/tutorials in order to start learning python?  
Thanks,  
Daniel

```auto
# Load the Python Standard and DesignScript Libraries
import clr
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)

OUT = [x.ToXyz() for x in IN[0]] 

```

 ![code](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/2/124459b6f6241a658df1bba648484b20d704e172.png)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 15, 2021, 3:11pm UTC](https://forum.dynamobim.com/t/xyz-list-points/65166/2 "2021-06-15T15:11:29Z")

</div>

Super close. Your code is correct for a single list, but not multiple. You need another loop for each sublist in your input list as well as output lists to append to. Something like:

```auto
output = []
for sub in IN[0]:
     output.append([x.ToXyz() for x in sub])
OUT = output

```

---

<div class="post-metadata">

**Author:** ![s258085](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@s258085](https://forum.dynamobim.com/u/s258085)\
**Post date:** [June 15, 2021, 3:26pm UTC](https://forum.dynamobim.com/t/xyz-list-points/65166/3 "2021-06-15T15:26:42Z")

</div>

> [@Nick\_Boyts](#):
>
> ```auto
> output = []
> for sub in IN[0]:
> output.append([x.ToXyz() for x in sub])
> OUT = output
> 
> ```

Thanks a lot! Any idea where can I learn some more python for dynamo?

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [June 15, 2021, 3:30pm UTC](https://forum.dynamobim.com/t/xyz-list-points/65166/4 "2021-06-15T15:30:11Z")

</div>

[Revitapidocs](https://www.revitapidocs.com/) is great for learning the Revit API. Python has tons of free tutorials, videos, and forums available online. And of course the Dynamo forums here are a good source for both, though not always as in-depth.

Here’s a collection of basics we’ve collected on the forums: [Python Nodes Basics](https://forum.dynamobim.com/t/python-nodes-basics/15872)
