queue = [] def length(): """Returns number of waiting customers""" return len(queue) def show(): """SHOW queue: print list of waiting customers. Customer waiting longest are shown at the end of the list.""" for name in queue: print("waiting customer: {}".format(name)) def add(name): """Customer with name 'name' joining the queue""" queue.insert(0, name) def next(): """Returns name of next customer to serve, removes customer from queue""" return queue.pop() add('Spearing'); add('Fangohr'); add('Takeda') show(); next()