figure deque of python data objects queue deques we will conclude this introduction to basic data structures by looking at another variation on the theme of linear collections howeverunlike stack and queuethe deque (pronounced "deck"has very few restrictions alsobe careful that you do not confuse the spelling of "dequewith the queue removal operation "dequeue what is dequea dequealso known as double-ended queueis an ordered collection of items similar to the queue it has two endsa front and rearand the items remain positioned in the collection what makes deque different is the unrestrictive nature of adding and removing items new items can be added at either the front or the rear likewiseexisting items can be removed from either end in sensethis hybrid linear structure provides all the capabilities of stacks and queues in single data structure figure shows deque of python data objects it is important to note that even though the deque can assume many of the characteristics of stacks and queuesit does not require the lifo and fifo orderings that are enforced by those data structures it is up to you to make consistent use of the addition and removal operations the deque abstract data type the deque abstract data type is defined by the following structure and operations deque is structuredas described aboveas an ordered collection of items where items are added and removed from either endeither front or rear the deque operations are given below deque(creates new deque that is empty it needs no parameters and returns an empty deque add_front(itemadds new item to the front of the deque it needs the item and returns nothing basic data structures