Have two simple python codes, both are working. But no sure what is the "self" in there that makes the difference. When to use and when not to use "self"?
class car:
colour="red"
def method1():
print("method1")
myCar=car
myCar.method1()
class car:
colour="red"
def method1(self):
print("method1")
myCar=car()
myCar.method1()