Is there any way to remove an item in deque by index?
dq = deque(['a','b','c'])
dq.removeByIndex(1)
#output deque(['b', 'c'])
I only see remove by value in the doc. Also, I know I can just pop it i
times and then put it back, but it doesn't look pretty.
deque
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With