q = [] def length(): """Returns number of waiting customers""" return len(q) def show(): """SHOW queue: print list of waiting customers. Customer waiting longest are shown at the end of the list.""" print(q) def add(name): """Customer with name 'name' joining the queue""" q.append(name) def next_(): """Returns name of next customer to serve, removes customer from queue""" return q.pop(0)