to demonstrate the two operationsthe following table shows the effect of adding and removing elements from queuequeue operation size contents operation results [queue object created enqueue "mark ['mark'mark added to queue enqueue "john ['mark','john'john added to queue size( ['mark','john'number of items in queue returned dequeue( ['mark'john is dequeued and returned dequeue( [mark is dequeued and returned queue(list-based queue to put into code everything discussed about queues to this pointlet' go ahead and implement very simple queue using python' list class this is to help us develop quickly and learn about queues the operations that must be performed on the queue are encapsulated in the listqueue classclass listqueuedef __init__(self)self items [self size in the initialization method __init__the items instance variable is set to []which means the queue is empty when created the size of the queue is also set to zero the more interesting methods are the enqueue and dequeue methods enqueue operation the enqueue operation or method uses the insert method of the list class to insert items (or dataat the front of the listdef enqueue(selfdata)self items insert( dataself size +