def make_models(): models = {} another = True while another: model = make_model() models[model.name] = model print ("Would you like to add another model?") another = choose_yes_no() return models
def make_bicycles(models): bicycles = [] another = True while another: order = make_bicycle(models) bicycles.extend(order) print ("Would you like to add another order of bicycles?") another = choose_yes_no() return bicycles