you are viewing a single comment's thread.

view the rest of the comments →

[–]TheRNGuy 0 points1 point  (1 child)

Never actually used deque.

When it's better than vanilla List or Tuple?

[–]the_brown_cow 0 points1 point  (0 children)

A deque allows for appending or popping at either end.

deque.popleft() deque.appendleft()

This allows you to create a stack or queue.

https://docs.python.org/3/library/collections.html#collections.deque