Adam, I am going to try and sort through the pseudocode you provided to see if I can get things up and running that way has well. This a part of a larger workflow thing and needs to be in the format that I have. Sticking all this into a database is down the road a ways.
*for every line in ONE:* * make a dictionary with a key = to the protein ID and the value, the rest* I am pretty sure I have this correct by doing this: xml = open("final.txt",'r') gen = open("final_gen.txt",'r') PIDS = {} for proteinVals in xml: ID = proteinVals.split()[0] PIDS[ID] = proteinVals print PIDS For this part: *for every line in TWO:* * if the dictionary has the same protein ID:* * perform the string merging and write to the file* For this part I would need to do something like: for line in gen: ID = proteinVals.split()[0] if ID in PIDS: (I need to check for the key?) ???How do you merge lines being read in to a previous dictionary else: move on to next number Thanks! ara -- Quis hic locus, quae regio, quae mundi plaga. Ubi sum. Sub ortu solis an sub cardine glacialis ursae.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor