# Do while loops get buggy in python script?

**URL:** <https://forum.dynamobim.com/t/do-while-loops-get-buggy-in-python-script/24142>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [July 25, 2018, 8:17pm UTC](https://forum.dynamobim.com/t/do-while-loops-get-buggy-in-python-script/24142 "2018-07-25T20:17:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WARTELLAD](https://avatars.discourse-cdn.com/v4/letter/w/34f0e0/32.png) [@WARTELLAD](https://forum.dynamobim.com/u/WARTELLAD)\
**Post date:** [July 25, 2018, 8:17pm UTC](https://forum.dynamobim.com/t/do-while-loops-get-buggy-in-python-script/24142/1 "2018-07-25T20:17:34Z")

</div>

So I used an online python compiler and got this result:

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

However when I run it in dynamo, I only get the first point, as shown below:

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

Here’s my python script for reference:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/4/5446fb52661fd8813507d06545bf9ae7fa838324.png)

I know the code works because I ran it on an online python compiler using the same x and y numbers in dynamo. Any thoughts?

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [July 25, 2018, 8:21pm UTC](https://forum.dynamobim.com/t/do-while-loops-get-buggy-in-python-script/24142/2 "2018-07-25T20:21:39Z")

</div>

You’re only outputting one of your lists
