class Apple(object):
name = 'apple'
p1 = Apple()
p2 = Apple()
p1.name = 'orange'
print(p1.name)
print(p2.name)
''' Ordinary variable (non-class variable), the variable exists after being assigned a value. The variables of the class can be assigned outside the def in the class, through the
variable name, and can be assigned through the class object in the def'''
name = 'apple'
p1 = Apple()
p2 = Apple()
p1.name = 'orange'
print(p1.name)
print(p2.name)
''' Ordinary variable (non-class variable), the variable exists after being assigned a value. The variables of the class can be assigned outside the def in the class, through the
variable name, and can be assigned through the class object in the def'''