how to delete multiple elements from a list

etsang at etsang at
Wed Nov 15 00:59:39 CET 2000


I have a List X with N number of items in it. I have another List Y
which contains the postion of the elements to be deleted from List X.
I cannot do a for loop to delete that because for each iteration, List
X will be changed and there will be sliperage.

How can I delete all the items as specified by the positions in Y at
one time? Also both List X and List Y are known in run time only.

Sent via
Before you buy.

More information about the Python-list mailing list