Why sorting mixed list does not work : <p>Been scratching my head this one for quite some time:</p>

<pre><code>mixed = [-131.23, 33213, 4454, 566, -33, 465. -377.312, 5.6656]
print(sorted(mixed, key=float))
</code></pre>

<p>Expected output is:</p>

<pre><code>[-131.23, -377.312, -33, 5.6656, 566, 4454, 33213]
</code></pre>

<p>Instead I'm always getting this</p>

<pre><code>[-131.23, -33, 5.6656, 87.68799999999999, 566, 4454, 33213]
</code></pre>

<p>Why -337.312 gets converted to 87.6879999999?? I assume each element gets converted to float when using key=float...so why this behaviour?</p>
