title: Confusion over how the OR operator works in python
body: <p>I'm trying to see if my parameter (call it 'n') is an integer or float and returning the absolute value of n if it is an integer or float.</p>
  
  <pre><code>if type(n) == int or type(n) ==float:
     return abs(n)
  else: 
     return "blahblah"
  </code></pre>
  
  <p>Versus</p>
  
  <pre><code>if type(n) == (int or float):
     return abs(n)
  else:
     return "blahblah"
  </code></pre>
  
  <p>The 2nd block produces something different than I expected. What is it doing?</p>