I'm confused. If you do (using W G's variable names)
for refSymbol in symbols.readlines():
print refSymbol
won't all the lines be printed? Doesn't the "for" loop process once for each
item in the array returned by readlines (changing refSymbol each time through
the loop), thus accomp
ould have to
open/read/close the file in each pass. Thus, the dictionary solution saves you
from doing this.
Mike
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:pythondotnet-
> [EMAIL PROTECTED] On Behalf Of Thane
> Sent: Wednesday, November 30, 2005 2:51 PM
> To: 'W
Read in the first file and create a dictionary (hash) of each line.
Read in the second file and for each line see if the dictionary contains the
item. This solution minimizes your I/O.
Python 2.4b1 (#57, Oct 15 2004, 15:23:38) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credit