How to compare type of an object in Python?
<p>Basically I wanna do:</p>

<pre><code>obj = 'str'
type ( obj ) == string
</code></pre>

<p>I tried:</p>

<pre><code>type ( obj ) == type ( string )
</code></pre>

<p>and didn't work.</p>

<p>EDIT: Thanks. Also what about the other types? Like there was NoneType that I couldn't replicate.</p>
