擅长:python、mysql、java
<p>见<a href="http://docs.python.org/library/stdtypes.html#comparisons">the manual</a>:</p>
<blockquote>
<p>Objects of different types, except different numeric types and different string types, never compare equal; such objects are ordered consistently but arbitrarily (so that sorting a heterogeneous array yields a consistent result).</p>
</blockquote>
<p>以及</p>
<blockquote>
<p><strong>CPython implementation detail:</strong> Objects of different types except numbers are ordered by their type names; objects of the same types that don’t support proper comparison are ordered by their address.</p>
</blockquote>