Solveeit Logo

Question

Computer Science Question on File Handling in Python

In Python, ________ module needs to be imported for implementing a Double-Ended Queue?

A

counter

B

collections

C

random

D

numpy

Answer

collections

Explanation

Solution

The collections module in Python includes deque, which allows efficient append and pop operations on both ends of the queue.