Isn't there a good function?
How to use: dellist (list, index you want to delete)
python
dellist = lambda items, indexes: [item for index, item in enumerate(items) if index not in indexes]
A=["a","b","c","d","e","f","g","h"]
r=[0,4,5]
dellist(A,r)
>>['b', 'c', 'd', 'g', 'h']
Recommended Posts