Python Programming - Standard Libraries - Discussion

Discussion Forum : Standard Libraries - General Questions (Q.No. 55)
55.
What is the purpose of the collections.deque class?
Implementing queues and priority queues
Sorting elements in a list
Handling dates and times
Creating a dictionary with default values
Answer: Option
Explanation:
The collections.deque class in Python is used to implement double-ended queues, which can be used for efficiently adding and removing elements from both ends.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.