as summary and referencefigure - sketches all the built-in object types available in python and their relationships we've looked at the most prominent of thesemost of the other kinds of objects in figure - correspond to program units ( functions and modulesor exposed interpreter internals ( stack frames and compiled codethe largest point to notice here is that everything in python system is an object type and may be processed by your python programs for instanceyou can pass class to functionassign it to variablestuff it in list or dictionaryand so on type objects in facteven types themselves are an object type in pythonthe type of an object is an object of type type (say that three times fast!seriouslya call to the built-in function type(xreturns the type object of object the practical application of this is that type objects can be used for manual type comparisons in python if statements howeverfor reasons introduced in manual type testing is usually not the right thing to do in pythonsince it limits your code' flexibility one note on type namesas of python each core type has new built-in name added to support type customization through object-oriented subclassingdictliststrtupleintfloatcomplexbytestypesetand more in python names all references classesand in python but not xfile is also type name and synonym for open calls to these names are really object constructor callsnot simply conversion functionsthough you can treat them as simple functions for basic usage in additionthe types standard library module in python provides additional type names for types that are not available as built-ins ( the type of functionin python but not xthis module also includes synonyms for built-in type names)and it is possible to do type tests with the isinstance function for exampleall of the following type tests are truetype([ ]=type([]type([ ]=list isinstance([ ]listcompare to type of another list compare to list type name test if list or customization thereof import types def ()pass type( =types functiontype types has names for other types because types can be subclassed in python todaythe isinstance technique is generally recommended see for more on subclassing built-in types in python and later tuplesfilesand everything else