Get a syntax error but still lets me pass


i am allowed to pass but i get this error message "File "python", line 3
def__init__(self, model, color, mpg):
SyntaxError: invalid syntax"

please someone tell me what is wrong with the code

class Car(object):
    condition = "new"
    def__init__(self, model, color, mpg):
        self.model = model
        self.color = color
        self.mpg = color

my_car = Car("DeLorean", "silver", 88)
print my_car.condition



It should be:

self.mpg = mpg


wow i cant believe i missed that, that didnt fix it but i realised my mistake, i didnt put a space after def.



Good you saw that, too.

Have fun coding! :slight_smile: