Question
Computer Science Question on Introduction to Queue (FIFO)
________ data type is used to implement a Queue data structure in Python?
A
Sets
B
Dictionary
C
Tuple
D
List
Answer
List
Explanation
Solution
In Python, queues can be implemented using a list, which supports append to add and pop to remove elements. For efficiency, collections.deque is recommended for double-ended queues.