classclass can be defined as collection of objects it is logical entity that has some specific attributes and methods for exampleif you have an employee class then it should contain an attribute and method an email idnameagesalary etc for exampleif you have an employee class then it should contain an attribute and method an email idnameagesalary etc syntaxclass classnamemethodmethod is function that is associated with an object in pythonmethod is not unique to class instances any object type can have methods objectobject is an entity that has state and behavior it may be anything it may be physical and logical for examplemousekeyboardchairtablepen etc everything in python is an objectand almost everything has attributes and methods all functions have built-in attribute __doc__which returns the doc string defined in the function source code syntax class classnameself instance_variable value #value specific to instance class_variable value #value shared across all class instances #accessing instance variable class_instance classname(class_instance instance_variable #accessing class variable classname class_variable example class carwheels class variable def __init__(selfmake)