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, "r").readlines()
to read all data into memory, given that the file isn't huge.  You can
then use a for loop, step=2, to access 2 records at a time.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to