Python 2.7 if / elif statement with or
<p>i'm fairly new to python so i'm sure i'm doing something wrong. i am defining a function which accepts a string variable. i can not be sure exactly what the variable will be, but there a are a 3 values i want to test for and just return a string if are values are found. if those values are not found, i simply want to return 'unknown'. here is my code: </p>

<pre><code>def item_priority(cell_color):
  if cell_color == 'green' or 'yellow':
    return 'low'
  elif cell_color == 'red':
    return 'high'
  else:
    return 'unknown'
</code></pre>

<p>so then i try to execute:</p>

<pre><code>&gt;&gt; item_priority('orange')
</code></pre>

<p>python returns:</p>

<pre><code>'low'
</code></pre>

<p>the result i expected to see would be 'unknown'. even if i test with "item_priority('red')", it still returns 'low'. the only explanations i have found on this site so far involve code that is more complex than mine. </p>

<p>i have tried interchanging the second 'if' with 'elif' but my result is still the same. i'm not sure what i'm doing wrong here. any help is greatly appreciated. thanks!</p>