title: Check variable for multiple values - If statement best practice
body: <p>Is there a best practice for If-Statements in Python regarding OR/AND for one variable with multiple values?</p>
  <p>For example:</p>
  <p>Example 1:</p>
  <pre><code>if port == 443 or port == 80:
      pass
  </code></pre>
  <p>Example 2:</p>
  <pre><code>if port in {443,80}
      pass
  </code></pre>
  <p>Example 3:</p>
  <pre><code>if port in [443,80]
      pass
  </code></pre>
  <p>The first example becomes extremely confusing with an extremely large number of values.</p>