object-oriented programming string object input urllib object socket object dictionary object string object output beautifulsoup object html parser object figure ignoring detail when building an object an object can contain number of functions (which we call methodsas well as data that is used by those functions we call data items that are part of the object attributes we use the class keyword to define the data and code that will make up each of the objects the class keyword includes the name of the class and begins an indented block of code where we include the attributes (dataand methods (codeclass partyanimalx def party(selfself self print("so far",self xan partyanimal(an party(an party(an party(partyanimal party(ancodeeach method looks like functionstarting with the def keyword and consisting of an indented block of code this object has one attribute (xand one method (partythe methods have special first parameter that we name by convention self just as the def keyword does not cause function code to be executedthe class keyword does not create an object insteadthe class keyword defines template indicating what data and code will be contained in each object of type partyanimal the class is like cookie cutter and the objects created using the class are the cookies you don' put frosting on the cookie cutteryou put frosting on the cookiesand you can put different frosting on each cookie if we continue through this sample programwe see the first executable line of code cookie image copyright cc-by