title: Most efficient way to compare a variable to multiple values?
body: <p>A few times in my program, I've had to check if a variable was one of many options. For example</p>
  <pre><code>if (num = (&lt;1 or 2 or 3&gt;)) { DO STUFF }
  </code></pre>
  <p>I've messed around with 'OR's, but nothing seems to be right. I've tried</p>
  <pre><code>if (num == (1 || 2 || 3))
  </code></pre>
  <p>but it does nothing.</p>
  <p>I'd like to conveniently distinguish between several groups. For example</p>
  <pre><code>if (num = (1,2,3))
  
  else if (num = (4,5,6))
  
  else if (num = (7,8,9))
  </code></pre>