Hi Amrita, I'm just a beginner but I notice that, after the first two entries on each line (i.e. 10,ALA), the rest might fit nicely into a dict, like this {H: 8.388, HB1: 1.389, ...}. That would give you a lot of flexibility in getting at the values later. It would be easy enough to replace the "=" with ':", and add some curly braces. In fact, if you enclosed each line in square braces, changed =/: and added the curly braces on the dict, then each line would already be a list containing a dictionary, and you'd be ready to do some rearranging very easily.
Whether you do that in Python or when you are building your file in whatever system it's coming from is your call. If you left off the outer braces, each line is a tuple containing a dict, which works too. Sorry if all I've done is state the obvious here. I warned you I'm a beginner.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor