<font color="#000000">I'm guessing you have something like<br><br>list1=['1.0', '2.3', '4.4', '5.5', ...], right?<br><br>You can do this:<br><br>for i in range(len(list1)):<br>  list1[i] = float(list1[i])<br>
<br>There's almost certainly a 1-liner you can use, but this should work.<br><br>--Jason<br></font><br><div class="gmail_quote">On Fri, Mar 25, 2011 at 8:19 AM, joy99 <span dir="ltr"><<a href="mailto:subhakolkata1234@gmail.com">subhakolkata1234@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Dear Group,<br>
<br>
I got a question which might be possible but I am not getting how to<br>
do it.<br>
<br>
If I have a list, named,<br>
list1=[1.0,2.3,4.4,5.5....]<br>
<br>
Now each element in the array holds the string property if I want to<br>
convert them to float, how would I do it?<br>
<br>
Extracting the values with for and appending to a blank list it would<br>
not solve the problem. If appended to a blank list, it would not<br>
change the property.<br>
<br>
If any one of the learned members can kindly suggest any solution?<br>
<br>
Thanks in advance.<br>
Best Regards,<br>
Subhabrata.<br>
<font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div>