Madhusudan> Is it possible to convert a very long list of strings to a Madhusudan> list of floats in a single statement ?
Madhusudan> I have tried float(x) and float(x[:]) but neither work. I Madhusudan> guess I would have to write a loop if there isn't a way. Try: >>> los = ["123.0", "2", "1e-6"] >>> map(float, los) [123.0, 2.0, 9.9999999999999995e-07] >>> [float(s) for s in los] [123.0, 2.0, 9.9999999999999995e-07] Skip -- http://mail.python.org/mailman/listinfo/python-list