Create an instance of a class


#1

help

class Car(object):
    my_car = Car()

I've also tried this code

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

but neither work


#2

@designjumper52034,
google search
== discussions / opinions ==
python creating an Instance site:stackoverflow.com
for instance
http://stackoverflow.com/questions/5924879/how-to-create-a-new-instance-from-a-class-object-in-python


#3

don't indent your object it needs to be outside your class in order to call your class