Removing a particular index from a list

Cyril Cheneson ccheneson at
Thu Mar 22 14:14:31 CET 2007

>>> li = ["sri", "s", "srikanth", "s"]

> And if I want to remove the last item ("s"), how do I remove it?
> li.remove(-1) doesn't do it. This is my problem.
> Thanks,
> Srikanth

li.pop() will remove the last element


More information about the Python-list mailing list