On Apr 3, 3:53 pm, "bahoo" <[EMAIL PROTECTED]> wrote:
> > target = "0024"
> > l = ["0024", "haha", "0024"]
>
>
> > for index, val in enumerate(l):
> >     if val==target:
> >         del l[index]
>
> > print l
>
> This latter suggestion (with the for loop) seems to be buggy: if there
> are multiple items in the list "l" equal to "target", then only the
> first one will be removed!
>
> Thanks anyways.

Prove it.


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

Reply via email to