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']. What I want to do is to find minimum and maximum number in this list.
I used min function, s = ['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'] print min(s) print max(s) these gives me 1.181 9.0601 maximum value is wrong. It must be 10.24. I know why max function gives wrong number. Because max function processed elements of list as strings. How can I convert the elements of list to float so max function finds the correct answer. I hope I can explain my problem. Cuneyt. -- http://mail.python.org/mailman/listinfo/python-list