Is it possible to convert list to queue in python?
python
Solution
pop from the front of a list is not very efficient as all the references in the list need to be updated.
deque will allow you do queue like operations efficiently
>>> from collections import deque
>>> deque([1,2,3,4])
deque([1, 2, 3, 4])
Problem
How to convert a list to queue? So that operations like enqueue or dequeue an be carried out. I want to use to the list to remove the top most values and i believe it can be done using queues.