Class and instance attributes:

class Car:
color = "red"
Car.color = "green"
class Car:
def __init__(self, age=0):
self.age = age
@property
def age(self):
return self.__age
@age.setter
def age(self, value):
self.__age = value

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store