In Python, how to I convert all items in a list to floats?
<p>I have a script which reads a text file, and pulls decimal numbers out of it as strings, and places them into a list.</p>

<p>So I have this list: <code>['0.49', '0.54', '0.54', '0.54', '0.54', '0.54', '0.55', '0.54', '0.54', '0.54', '0.55', '0.55', '0.55', '0.54', '0.55', '0.55', '0.54', '0.55', '0.55', '0.54']</code></p>

<p>How do I convert each value in the list from a string to a floating point.</p>

<p>I have tried</p>

<pre><code>for item in list:
    float(item)
</code></pre>

<p>But this doesn't seem to work for me...</p>
