oh? Is is the negative?
On Mon, 07 Feb 2005 09:36:02 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote: > Liam Clarke wrote: > >>>example of (1): > >>>--------------------------------------------------------- > >>>#this part of the program reads the file basin.out (the data we want to > >>>analyze) and changes its contents to the array arr_xy > >>>#layout of basin.out: > >>>#1 -950.00 10.00 200 > this line contains start, interval and > >>>number of x values; > >>># 0.000000E+00 > remainder is a column of y values > >>># -1.931787E-07 > >>># -5.713295E-07 > >>># -9.322559E-07 > >>># -1.071361E-06 > >>># -7.801342E-07 > >>># ..... > >>start = int(float(list[1])) > >>interval = int(float(list[2])) > >>n = int(float(list[3])) > > > > > > list[1] is a string, so if I'm not missing something, start = > > int(list[1]) will do just fine. > > No, because list[1] is '-950.00' which will not parse as an int. > > Kent > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > -- 'There is only one basic human right, and that is to do as you damn well please. And with it comes the only basic human duty, to take the consequences. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor