class attributes the attribute defined in the class is called "class attributesand the attributes defined in the function is called 'instance attributeswhile definingthese attributes are not prefixed by selfas these are the property of the class and not of particular instance the class attributes can be accessed by the class itself classname attributenameas well as by the instances of the class (inst attributenamesothe instances have access to both the instance attribute as well as class attributes class myclass()age myclass age myclass( age class attribute can be overridden in an instanceeven though it is not good method to break encapsulation there is lookup path for attributes in python the first being the method defined within the classand then the class above it class myclass(object)classy 'class valuedd myclass(print (dd classythis should return the string 'class valueclass value dd classy "instance valueprint(dd classyreturn the string "instance valueinstance value this will delete the value set for 'dd classyin the instance del dd classy since the overriding attribute was deletedthis will print 'class valueprint(dd classyclass value