# Python If Statement for beginner?

**URL:** <https://forum.dynamobim.com/t/python-if-statement-for-beginner/4144>\
**Category:** Developers\
**Created:** [May 24, 2016, 2:50am UTC](https://forum.dynamobim.com/t/python-if-statement-for-beginner/4144 "2016-05-24T02:50:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justin\_Wright](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@Justin\_Wright](https://forum.dynamobim.com/u/Justin_Wright)\
**Post date:** [May 24, 2016, 2:50am UTC](https://forum.dynamobim.com/t/python-if-statement-for-beginner/4144/1 "2016-05-24T02:50:43Z")

</div>

Can some one tell me what I’m doing wrong here?.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/5/5100545e25009461c6bb97a2aab0613c9d48d45a.png)

---

<div class="post-metadata">

**Author:** ![Dimitar\_Venkov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dimitar_venkov/32/2068_2.png) [@Dimitar\_Venkov](https://forum.dynamobim.com/u/Dimitar_Venkov)\
**Post date:** [May 24, 2016, 2:58am UTC](https://forum.dynamobim.com/t/python-if-statement-for-beginner/4144/2 "2016-05-24T02:58:20Z")

</div>

Hi,  
You’re trying to compare the entire list called “String” to another string. You should be comparing the individual instances of that list instead:

> ```
> if i == "Count:
> Answer.append("Item")
> 
> ```

---

<div class="post-metadata">

**Author:** ![Justin\_Wright](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@Justin\_Wright](https://forum.dynamobim.com/u/Justin_Wright)\
**Post date:** [May 24, 2016, 3:05am UTC](https://forum.dynamobim.com/t/python-if-statement-for-beginner/4144/3 "2016-05-24T03:05:57Z")

</div>

Thank You!.  
That makes perfect sense now.
