syntax

Chris Rebert clp2 at rebertia.com
Tue Jan 19 02:24:59 CET 2010


On Mon, Jan 18, 2010 at 5:23 PM, Chris Rebert <clp2 at rebertia.com> wrote:
> On Mon, Jan 18, 2010 at 4:53 PM, marlowe <marlowequart at hotmail.com> wrote:
<snip>
>> L=float(data[40][3])+float(data[41][3])+float(data[42][3])+float(data
>> [43][3])\
>> +float(data[44][3])+float(data[45][3])+float(data[46][3])+float(data
>> [47][3])\
>> +float(data[48][3])+float(data[49][3])+float(data[50][3])+float(data
>> [51][3])\
>> +float(data[52][3])+float(data[53][3])+float(data[54][3])+float(data
>> [55][3])\
>> +float(data[56][3])+float(data[57][3])+float(data[58][3])+float(data
>> [59][3])\
>> +float(data[60][3])
>
> H = sum(float(data[i][3]) for i in xrange(40,61))

Erm, L for that second one obviously, not H:

L = sum(float(data[i][3]) for i in xrange(40,61))

- Chris



More information about the Python-list mailing list