> > isHTML = [filename if filename.endswith('.htm') or\ > > filename.endswith(.html') for filename in files] > > return isHTML > > No, it should be...
Well spotted, but... > > isHTML = [filename for filename in files if filename.endswith('.htm') or\ > filename.endswith('.html') for filename in files] > isHTML = [filename for filename in files if filename.endswith('.htm') or\ > filename.endswith('.html')] you forgot to remove the last loop! Oh, and the line continuation slash shouldn't nbe needed since its inside the [] Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor