python - removing elements incrementally from a list -


I have a list of float numbers and I would like to delete the group of incremental elements in a series of indexed series, sth For example:

  category for category: (startIndex, and Induct + 1): print ("remove [% d] => val:% g"% (j, MyList [j]) Del myList [j]  

However, since I'm running on the same list, the index (category) is not valid for the new list. Does anyone suggest removing the elements properly?

Good luck

Do you really need them to grow?

If not, you can do this:

  code  startIndex: endIndex + 1]  

Comments