Nov-06-2016, 11:59 PM
I was wondering if when you deque a list, can you still access the middle of the list using the index?
For example :
from collections import deque
q = deque("David", "Sally", "Ralph", "Lisa")
I know I can POPLEFT, POP and append to the list, but am I able to also remove items that are not first or last using indexing?
For example :
from collections import deque
q = deque("David", "Sally", "Ralph", "Lisa")
I know I can POPLEFT, POP and append to the list, but am I able to also remove items that are not first or last using indexing?