A queue is similar to a stack, except that is processes data in a different order.
Queue are display and explain horizontaly.
It's like a line of peaple at the movie theater.
The first one in line is the first one to leave and enter the theater (FIFO).
Deque / Python
In Python, queues are a buit-in data structure with its own standard library.
Deque in python is a versatile implementation of double-ended
It allows you to effectively use it as a stack,
a queue, or a combination of both.
from collections import deque
my_queue = deque()
print("Queue after insertion =", my_queue)
front = my_queue.popleft()
print("Queue after deletion =", my_queue)
print("Popped left element =", front)
Like many other abstarct data types, it isn't implemented in many programming languages.
Let's create a queue to see how it works
self.items = 
def append(self, item):
self.items += [item]
item = self.items
self.queue = self.items[1:]
queue = Queue()
print("Queue after insertion =", queue)
popped = queue.popleft()
print("Remove from queue front =", popped)
print("Queue after deletion =", queue)
print("New front =", queue.read())