How can I simplify my if condition in python?
<p>I would like to know if there's a simpler way to write the condition of the <code>if</code> statement. Something like <code>item1, item2 == "wood":</code>. I currently have this code:</p>

<pre><code>item1 = input("item1: ")
item2 = input("item2: ")

if item1 == "wood" and item2 == "wood":
    print("You created a stick")
</code></pre>

<p>In this particular case, it's fine to leave it as is. But if you have three or more elements, try using a list:</p>

<pre><code>items = [] # Declare a list

# Add items to list
for x in range(1, 4):
    items.append(input("item" + str(x) + ": "))

if all(item == "wood" for item in items):
    print("You created a stick")
</code></pre>

python if-statement condition simplify