I want to use a list of indices to remove items from my list of tuples:
mytupList = [(1,2),(2,3),(5,6),(8,9)]
indxList = [1,3]
I have tried using numpy like so:
newtupList = numpy.delete(mytupList,indxList).tolist()
but it has not worked.
I want my newtupList = [(1,2),(5,6)]
what am I doing wrong? I have also tried:
a = np.array(mytupList)
newtup = np.delete((a),indxList)
but this does not produce the desired result.