How do you use Python's deque for high-performance queue operations?
Python's deque, short for "double-ended queue," is a highly optimized data structure available in the collections module. It's designed to provide fast, memory-efficient queue operations from both ends of the queue. Unlike list objects that have O(n) time complexity for operations like insertions and deletions at the beginning, deque operations can be done in O(1) time complexity, making them suitable for tasks with a high rate of adding and removing elements.