On Wed, 14 Feb 2007 17:29:26 +0000, Simon Brunning wrote: > On 2/14/07, Steve <[EMAIL PROTECTED]> wrote: >> I'm trying to create a list range of floats and running into problems. >> I've been trying something like: >> >> a = 0.0 >> b = 10.0 >> >> flts = range(a, b) >> >> fltlst.append(flts) >> >> When I run it I get the following DeprecationWarning: integer argument >> expected, got float. How can I store a list of floats? > > There would be an *enormous* number of floats between zero and ten. Do > you really want all of them in your list? I hope you have a few > terrabytes of RAM... > > Or do you just want the integer values as floats? > > fits = list(float(a) for a in range(0, 10))
After re-reading my original post I was pretty vague. I'm trying to creat a list of ranges of floats, 0.0 10.0, 11 20, etc then checking to see if an float, example 12.5 falls in the list and if so get the list index of where it is in the index. Does this make sense? Steve -- http://mail.python.org/mailman/listinfo/python-list