Steve 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? > > TIA > Steve > What does range of floats mean? How many floats are there between 0.0 and 10.0? If you want the step to be 1.0 and beginning and ending values will be whole numbers then this will work:
flts=[float(i) for i in range(1, 11)] If you want arbitrary starting and ending floats and an arbitrary step, you will need to write your own function. -Larry -- http://mail.python.org/mailman/listinfo/python-list