class Car(object): condition = "new" def __init__(self, model, color, mpg): self.model = self color.model = color mpg.model = mpg my_car = Car("Delorean", "silver", 88): model = Delorean color = silver mpg = 88 print my_car.model, my_car.color, my_car.mpg print my_car.model print my_car.color print my_car.mpg
__init__ should be inside the
Car class. Right now it is inside it is outside the class. The indent is causing it to be so. Do you know how to fix it?