Python If Statement for beginner?

#1

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

1 Like

Python Nodes Basics
#2

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")
1 Like

#3

Thank You!.
That makes perfect sense now.

0 Likes