On 19/10/06, Chris Hengge <[EMAIL PROTECTED]> wrote: > The point of this script is to read a text file that has a bunch of code > that calls external files. Then read the directory where all the files are.. > I build a list from the text file (this works correct), and I build a list > from the directory (this works correct). I want to print out the result of a > match.. > > Here is sample output. > Tested: Textname: DirectoryName: > Match! a.exe a.exe > Fail! A.exe a.exe
for filename in Textname: try: print '%s found in DirectoryName at position %d' % (filename, DirectoryName.index(filename)) except ValueError: print '%s not found in DirectoryName.' % filename ? _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor