title: Why different results from an if-statement in Python 3 and C?
body: <p>I hoped that the values printed would be "200!" and "404!" in Python3.4. But I got the results "200!" and "else!".</p>
  
  <p>I made a strange face — and tried it again in C. The results in C are not the same as those in Python3. Why?</p>
  
  <p>Python3.4 code</p>
  
  <pre><code>def chk(s): 
      if s is 200:
          print('200!')
      elif s is 404:
          print('404!')
      else:
          print('else!')
  
  chk(200)
  chk(404)
  </code></pre>
  
  <p>Python3.4 code result</p>
  
  <pre><code>200!
  else!
  </code></pre>
  
  <p>C code</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void chk(int s) {
      if (s == 200)
          printf("200!");
      else if (s == 404)
          printf("404!");
      else
          printf("else!");
  }
  
  int main(void) {
      chk(200);
      chk(404);
      return 0;
  }
  </code></pre>
  
  <p>C code result</p>
  
  <pre><code>200!404!
  </code></pre>