I just noticed that in Python there is no function to delete an item in a list by index, which will be used when chaining.
For example, I am looking for something like this:
another_list = list_of_items.remove[item-index]
instead
del list_of_items[item_index]
Since remove(item_in_list) returns a list after removing item_in_list ; I wonder why there is no similar function for the index. It seems very obvious and trivial to be included, believes that there is reason to skip this.
Any thoughts on why such a feature is not available?
----- EDIT -------
list_of_items.pop(item_at_index) not suitable because it does not return a list without deleting a specific item, so it cannot be used for chaining. (According to the Docs: L.pop ([index]) β item - delete and return the item by index)
source share