title: Python `type(x)==` what?
body: <p>In a code, I am trying to check the type of a class of a variable entered into a function.  What I want is something like this:</p>
  
  <pre><code>def foo(x):
      if type(x)=='int':
         pass
  </code></pre>
  
  <p>But I can't find anything that I can put in place of <code>'int'</code> that will return <code>True</code> when I input an integer.  I have made a temporary fix by doing <code>type(x)==type(1)</code>, but I would like to know what to do to not use this sneaky trick.</p>