> The solution so far is:
>
> for i in xrange(len(dirs), 0, -1):
>    if dirs[i-1].lower() in dirs_exclude:
>      del dirs[i-1]

This won't affect much, but uses better style I think.

Change:

for i in xrange(len(dirs),0,-1):

To:

for i in reversed(xrange(len(dirs))):

and then just use 'i' instead of 'i-1'

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to