I have a list of floating point numbers, and I would like to delete a set of elements in a given range of indices step by step, i.e.:
for j in range(beginIndex, endIndex+1):
print ("remove [%d] => val: %g" % (j, myList[j]))
del myList[j]
However, since I am repeating the same list, the indexes (range) are no longer valid for the new list. Does anyone have any suggestions for removing items correctly?
Regards
source
share