Correct question:
What is the missing line?
>>> myDeque = deque('math')
>>> myDeque
deque(['m', 'a', 't'])
Answer:
myDeque.pop()
Step-by-step explanation:
The double ended queue, deque found in the python collection module is very similar to a python list and can perform operations such as delete items, append and so on.
In the program written above, the missing line is the myDeque.pop() as the pop() method is used to delete items in the created list from the right end of the list. Hence, the 'h' at the right end is deleted and we have the output deque(['m', 'a', 't'])
myDeque.popleft () deletes items from the right.