your mail
Terry Reedy
tjreedy at udel.edu
Fri Oct 17 12:37:03 EDT 2014
More information about the Python-list mailing list
Fri Oct 17 12:37:03 EDT 2014
- Previous message (by thread): your mail
- Next message (by thread): your mail
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 10/17/2014 6:43 AM, Cameron Simpson wrote: > On 17Oct2014 11:45, Dhananjay <dhananjay.c.joshi at gmail.com> wrote: >> 2.1576318858 -1.8651195165 4.2333428278 >> ... >> (total of 200 lines) >> >> Columns 1,2,3 corresponds to x,y,z axis data points. > for line in open('flooding-psiphi.dat','r'): > line = line.split() > xs.append(float(line[0])) > ys.append(float(line[1])) > zs.append(float(line[2])) A further refinement: for line in open('flooding-psiphi.dat','r'): x, y, z = map(float, line.split()) xs.append(x) ys.append(y) zs.append(z) -- Terry Jan Reedy
- Previous message (by thread): your mail
- Next message (by thread): your mail
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list