Python: sum with if statement
<p>The next exercise from CodingBat:</p>

<blockquote>
  <p>Given 2 ints, a and b, return their sum. However, sums in the range
  10..19 inclusive, are forbidden, so in that case just return 20. </p>
  
  <p>sorta_sum(3, 4) → 7</p>
  
  <p>sorta_sum(9, 4) → 20</p>
  
  <p>sorta_sum(10, 11) → 21</p>
</blockquote>

<p>Here's my answer:</p>

<pre><code>def sorta_sum(a, b):
  if a + b == range(10, 20):
    return 20
  else:
    return a + b
</code></pre>

<p>They said when <code>a = 9</code> and <code>b = 4</code> it should return 20 but mine return 13.</p>

<p>How come my <code>if</code> statement didn't apply and the <code>else</code> statement did? 9+4 is 13 and in my <code>if</code> statement everything in range from 10 to 19 should return 20.</p>