How can i simplify this condition in python?
<p>Do you know a simpler way to achieve the same result as this?
I have this code:</p>

<pre><code>color1 = input("Color 1: ")
color2 = input("Color 2: ")

if ((color1=="blue" and color2=="yellow") or (color1=="yellow" and color2=="blue")):
            print("{0} + {1} = Green".format(color1, color2))
</code></pre>

<p>I also tried with this:</p>

<pre><code>if (color1 + color2 =="blueyellow" or color1 + color2 =="yellowblue")
</code></pre>

<p>You can use <code>set</code>s for comparison.</p>

<blockquote>
  <p>Two sets are equal if and only if every element of each set is contained in the other</p>
</blockquote>

<pre><code>In [35]: color1 = "blue"

In [36]: color2 = "yellow"

In [37]: {color1, color2} == {"blue", "yellow"}
Out[37]: True

In [38]: {color2, color1} == {"blue", "yellow"}
Out[38]: True
</code></pre>

python python-3.x if-statement condition simplify