class Car(object): # How to define the car def move(self): print('---the car is moving---') def stop(self): print('---parking---') # Define a shop class that sells cars class CarStore(object): def order(self): car = Car() # find a car return car # 1. Get a store that sells cars car_store = CarStore() # car_store.order().move() # 2. Book a car through this store my_car = car_store.order() # 3. Drive cool my_car.move() my_car.stop()