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