Create an instance of a class


#1

can some one help me with this....i don't know what is wrong with this code...


#2

Hi,

There should only be the pass key word inside of Car's definition. Create an instance of Car outside of the class definition.


#3

you removed the pass, it should look like this buddy

class Car(object):
pass
my_car = Car()


#4

It should be like this
`

class Car(object):
pass

my_car = Car()

`


#5

why do you create the instance outside the class definition?


#6

it worked for me as well but somehow I can't understand the whole point of "pass"
if you can explain it will be great :slight_smile:


#7

class Car(object) :
    pass
my_car = Car()

this one worked for me ... try your luck