If this is the record, then you can use split to get a list of the
individual fields and then convert to int or float where necessary.
rec = "2NHST1 C1 56 3.263 2.528 16.345 "
rec_split = rec.split()
print rec_split
If you want to read two records at a time, then use
all_data = open(name,
On Apr 14, 12:32 am, Steven D'Aprano
wrote:
> On Tue, 14 Apr 2009 00:15:18 -0700, Eduardo wrote:
> > Hello all,
>
> > I googled a lot but couldn't find anything that i could consider a
> > possible solution (though i am fairly new to the language and i think
> > this is the main cause of my failur
> Eduardo (E) wrote:
>E> Hello all,
>E> I googled a lot but couldn't find anything that i could consider a
>E> possible solution (though i am fairly new to the language and i think
>E> this is the main cause of my failure).
>E> This is the beginning of the file i have to parse:
>E> Modifie
On Tue, 14 Apr 2009 00:15:18 -0700, Eduardo wrote:
> Hello all,
>
> I googled a lot but couldn't find anything that i could consider a
> possible solution (though i am fairly new to the language and i think
> this is the main cause of my failure).
You haven't actually said what the problem is.
Hello all,
I googled a lot but couldn't find anything that i could consider a
possible solution (though i am fairly new to the language and i think
this is the main cause of my failure).
This is the beginning of the file i have to parse:
Modified System
32728
2NHST1 C1 56 3.263