# Wrong output from python list

**URL:** <https://forum.dynamobim.com/t/wrong-output-from-python-list/83796>\
**Category:** Uncategorized\
**Created:** [December 6, 2022, 11:02am UTC](https://forum.dynamobim.com/t/wrong-output-from-python-list/83796 "2022-12-06T11:02:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eng.elfeky](https://avatars.discourse-cdn.com/v4/letter/e/f475e1/32.png) [@eng.elfeky](https://forum.dynamobim.com/u/eng.elfeky)\
**Post date:** [December 6, 2022, 11:02am UTC](https://forum.dynamobim.com/t/wrong-output-from-python-list/83796/1 "2022-12-06T11:02:30Z")

</div>

I wrote a python script but the output is wrong as shown in the picture , can someone help me

 ![20221206_125909](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/a/7a0c900a720e28704e6520eee4779d570576999c.jpeg)

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [December 6, 2022, 11:16am UTC](https://forum.dynamobim.com/t/wrong-output-from-python-list/83796/2 "2022-12-06T11:16:01Z")

</div>

I’ve found that within dynamo the python nodes aren’t very happy using ‘and’… I have separated the statements in the past to fix his.

---

<div class="post-metadata">

**Author:** ![eng.elfeky](https://avatars.discourse-cdn.com/v4/letter/e/f475e1/32.png) [@eng.elfeky](https://forum.dynamobim.com/u/eng.elfeky)\
**Post date:** [December 6, 2022, 11:33am UTC](https://forum.dynamobim.com/t/wrong-output-from-python-list/83796/3 "2022-12-06T11:33:04Z")

</div>

I removed and ,but same problem appears

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [December 6, 2022, 11:33am UTC](https://forum.dynamobim.com/t/wrong-output-from-python-list/83796/4 "2022-12-06T11:33:49Z")

</div>

Have you tried nested statements?

If you’re still having issue post the code as a dyn file or text rather than a screen grab.

---

<div class="post-metadata">

**Author:** ![eng.elfeky](https://avatars.discourse-cdn.com/v4/letter/e/f475e1/32.png) [@eng.elfeky](https://forum.dynamobim.com/u/eng.elfeky)\
**Post date:** [December 6, 2022, 12:52pm UTC](https://forum.dynamobim.com/t/wrong-output-from-python-list/83796/5 "2022-12-06T12:52:50Z")

</div>

I reach to solution , the problem is that the input to python node was string not integer so i convert it to numbers
