On 7 September 2010 10:37, ceycey <cuneyt.er...@gmail.com> wrote:

> I have a list like ['1.1881', '1.1881', '1.1881', '1.1881', '1.1881',
> '1.1881', '1.1881', '1.1881', '1.1881', '1.1881', '1.7689',  '1.7689',
> '3.4225', '7.7284', '10.24', '9.0601', '9.0601', '9.0601', '9.0601',
> '9.0601'].



> How can I convert the elements
> of list to float so max function finds the correct answer.
>

 >>> input = ['3.4225', '7.7284', '10.24']
>>> [float(x) for x in input]
[3.4225, 7.7284, 10.24]

HTH,
Xav
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to