remove item from list based on name

Russell Blau russblau at hotmail.com
Thu May 27 15:11:57 EDT 2004


"Bart Nessux" <bart_nessux at hotmail.com> wrote in message
news:c95e2g$nm2$1 at solaris.cc.vt.edu...
> Hi,
>
> I am generating a list of file names... some of the files are locked by
> the OS (Windows XP) and I know the names of these files (NTUSER.DAT,
> ntuser.dat.LOG, etc.) But, I don't know their position in the list. Is
> there a way that I can delete these items from the list based on their
> names?

Have you tried this?

for name in systemfiles:
    filelist.remove(name)


-- 
I don't actually read my hotmail account, but you can replace hotmail with
excite if you really want to reach me.





More information about the Python-list mailing list