Hey all,
It's mostly solved. The program prints out to the screen just fine except
for the new line return. Here is what I ended up using:
########
#Merges two files into one using dictionaries
########
xml = open("final.txt",'r')
gen = open("final_gen.txt",'r')
PIDS = {}
for proteinVals in gen:
ID = proteinVals.split(',')[0]
PIDS[ID] = proteinVals
print PIDS
for line in xml:
ID = line.split(',')[1]
IDs = ID.strip()
rslt = "%s,%s"% (line,PIDS[IDs])
print rslt
When I write this to a file what's the best way to take out the new line?
Thanks again for everyone's help and pseudocode. It's been about 4 years
since my last programming project!
ara
--
Quis hic locus, quae regio, quae mundi plaga. Ubi sum. Sub ortu solis an sub
cardine glacialis ursae.
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor