Data structures · Queues and deques

A Queue class

A queue on a Python list takes four short methods, and which end of the list is the front decides how fast it runs.