pie
pie copied to clipboard
remove element by value and by index
Could I remove an element by its value and index ?
I'm not sure if you mean you wish to remove an element when its matches an index and it's value, or if you mean you want independent processes to do either.
There is no function for removing by index (although, there should be). If you want to remove by value, you can use Filter
or FilterNot
.
I am ready to implement a function for removing by index. I think issue https://github.com/elliotchance/pie/issues/171 is related to this one. @elliotchance approve or correct me please and I'll do that as soon as I can.
Go for it. The linked diff was against pie v1 which I'm not supporting anymore.
Added in https://github.com/elliotchance/pie/pull/194
@elliotchance perhaps, the issue could be closed because removing by index was implemented, and filtering function already exists.
@chocolacula yeah, good point