Question: remove Elements from List based on Index

Hi, I have been looking at various questions which are similar. But, I could not exactly what I am looking for.

https://www.mapleprimes.com/questions/99679-Removing-Elements-In-A-List

In the above link it is useful to remove elemets of specific type(identical in two lists). I am looking for removing elements from list with specific Index.

L := [1,1,a,c,1];
indexList:=[3,5]

Now based on IndexList I would like to remove the elements from L. That is I want to delete L[IndexList[1]] and L[indexList[2]]. I have tried to do it using

remove(has, L, L[indexList]);  

It is working when there are no identitical elements. In my case it fails to delete exact exlemens.

subs(seq(A[indexList[i]] = NULL, i = 1 .. nops(indexList)), A); Both are working in same way. Not suitable when having identical elements in a list
How one could delete(remove) elements based on index??

Please Wait...