the python list class has method called pop(the pop method does the following removes the last item from the list returns the removed item from the list back to the user or code that called it the last item in the list is popped and saved in the data variable in the last line of the methodthe data is returned consider the tunnel in the following figure as our queue to perform dequeue operationthe node with data is removed from the front of the queuethe resulting elements in the queue are as shown as followswhat can we say about the enqueue operationit is highly inefficient in more than one way the method has to first shift all the elements by one space imagine when there are million elements in list which need to be shifted around anytime new element is being added to the queue this will generally make the enqueue process very slow for large lists