[Tutor] Merging Text Files

Ara Kooser ghashsnaga at gmail.com
Thu Oct 14 21:07:11 CEST 2010


  I modified the code to this:
for line in xml:
    ID = line.split()[1]
    rslt = "%s,%s"% (line,PIDS[ID])
print rslt

and ended up with this error:
Traceback (most recent call last):
  File "/Users/ara/Desktop/biopy_programs/merge2.py", line 16, in <module>
    rslt = "%s,%s"% (line,PIDS[ID])
KeyError: 'sp.'


Quis hic locus, quae regio, quae mundi plaga. Ubi sum. Sub ortu solis an sub
cardine glacialis ursae.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20101014/d2d376d3/attachment.html>

More information about the Tutor mailing list