dequeue operation the other operation that makes our doubly linked list behave as queue is the dequeue method this method is what removes the node at the front of the queue to remove the first element pointed to by self headan if statement is useddef dequeue(self)current self head if self count = self count - self head none self tail none elif self count self head self head next self head prev none self count - current is initialized by pointing it to self head if self count is then it means only one node is in the list and invariably the queue thusto remove the associated node (pointed to by self head)the self head and self tail variables are set to none ifon the other handthe queue has many nodesthen the head pointer is shifted to point to self head' next node after the if statement is runthe method returns the node that was pointed to by head self count is decremented by one in either way the if statement execution path flows equipped with these methodswe have successfully implemented queueborrowing heavily from the idea of doubly linked list remember also that the only things transforming our doubly linked list into queue are the two methodsnamely enqueue and dequeue application of queues queues are used to implement variety of functionalities in computer land for instanceinstead of providing each computer on network with its own printera network of computers can be made to share one printer by queuing what each printer wants to print when the printer is ready to printit will pick one of the items (usually called jobsin the queue to print out operating systems also queue processes to be executed by the cpu let' create an application that makes use of queue to create bare-bones media player