Deleting from a list
Brad Bollenbach
bbollenbach at home.com
Tue Jan 1 22:07:13 EST 2002
More information about the Python-list mailing list
Tue Jan 1 22:07:13 EST 2002
- Previous message (by thread): Deleting from a list
- Next message (by thread): Deleting from a list
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
<bvdpoel at uniserve.com> wrote in message news:3C326CF0.A28B9FC7 at uniserve.com... > > Does python have a notion as to where the current item in a list is? [snip examples attempts at removing an item from a list] You could do, simply: foo = [1, 2, 3, 4] for i in range(foo): if foo[i] == 3: del foo[i] foo would then contain [1, 2, 4] HTH, Brad
- Previous message (by thread): Deleting from a list
- Next message (by thread): Deleting from a list
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list