If you want a first in first out it’s better than a list. Deque is also whats powering thread safe queues in python where you want said FIFO functionality when sending from one thread to another. (typically the order doesn’t matter since it’s threads, but generally speaking it makes more sense to take the first thing going in, out of it too.)
If you want a first in first out it’s better than a list. Deque is also whats powering thread safe queues in python where you want said FIFO functionality when sending from one thread to another. (typically the order doesn’t matter since it’s threads, but generally speaking it makes more sense to take the first thing going in, out of it too.)