<p>来自数据类型上的<a href="http://docs.python.org/2/tutorial/datastructures.html#comparing-sequences-and-other-types" rel="nofollow">docs</a>:</p>
<blockquote>
<p>Sequence objects may be compared to other objects with the same
sequence type. The comparison uses lexicographical ordering: first the
first two items are compared, and if they differ this determines the
outcome of the comparison; if they are equal, the next two items are
compared, and so on, until either sequence is exhausted.</p>
</blockquote>
<p>以及</p>
<blockquote>
<p>Note that comparing objects of different types is legal. The outcome
is deterministic but arbitrary: the types are ordered by their name.
Thus, a list is always smaller than a string, a string is always
smaller than a tuple, etc. <a href="http://docs.python.org/2/tutorial/datastructures.html#comparing-sequences-and-other-types" rel="nofollow">1</a> Mixed numeric types are compared
according to their numeric value, so 0 equals 0.0, etc.</p>
</blockquote>
<p>尤其是</p>
<blockquote>
<p><strong>Footnotes</strong> <a href="http://docs.python.org/2/tutorial/datastructures.html#comparing-sequences-and-other-types" rel="nofollow">1</a> The rules for comparing objects of different types
should not be relied upon; they may change in a future version of the
language.</p>
</blockquote>