Python, Data Science, Data Engineering, Programming, Coding.
deque deque1.appendleft(0) # Removing an item from the right of a deque deque1.pop() # Removing an item from the left of a deque deque1.popleft() # Accessing an item in a deque print(deque1[0]) # Iterating over a deque for item in deque1: print(item) # Deleting a deque del deque1 # Reverse a deque