No subject

Milton Segura syrax6l at hotmail.com
Sat Mar 17 02:54:22 EDT 2007


Hello, I'm trying to exclude files from a list using the following code:
 
for item in dirs:    if item.find('Software') > -1:        dirs.remove(item)    elif item.find('Images') > -1:        dirs.remove(item)
 
let's supose dirs = ['C:\Images', 'C:\Images\2006', 'C:\Images\2007', 'C:\Music', 'C:\Files', 'C:\Software', 'C:\Software\Python', 'C:\Software\iTunes']
 
For some reason.. it just won't exclude them.
I'd like to know why and how to fix it.
Thanks in advance.
Milton
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070317/cbe9bd89/attachment.html>


More information about the Python-list mailing list