object type example literals/creation numbers + decimal()fraction(strings 'spam'"bob' " ' \ ' 'sp\xc mlists [ [ 'three'] ]list(range( )dictionaries {'food''spam''taste''yum'}dict(hours= tuples ( 'spam' ' ')tuple('spam')namedtuple files open('eggs txt')open( ' :\ham bin''wb'sets set('abc'){' '' '' 'other core types booleanstypesnone program unit types functionsmodulesclasses (part ivpart vpart viimplementation-related types compiled codestack tracebacks (part ivpart viialso shown in table - program units such as functionsmodulesand classes--which we'll meet in later parts of this book--are objects in python toothey are created with statements and expressions such as defclassimportand lambda and may be passed around scripts freelystored within other objectsand so on python also provides set of implementation-related types such as compiled code objectswhich are generally of interest to tool builders more than application developerswe'll explore these in later parts toothough in less depth due to their specialized roles despite its titletable - isn' really completebecause everything we process in python programs is kind of object for instancewhen we perform text pattern matching in pythonwe create pattern objectsand when we perform network scriptingwe use socket objects these other kinds of objects are generally created by importing and using functions in library modules--for examplein the re and socket modules for patterns and sockets--and have behavior all their own we usually call the other object types in table - core data typesthoughbecause they are effectively built into the python language--that isthere is specific expression syntax for generating most of them for instancewhen you run the following code with characters surrounded by quotes'spamyou aretechnically speakingrunning literal expression that generates and returns new string object there is specific python language syntax to make this object similarlyan expression wrapped in square brackets makes listone in curly braces makes dictionaryand so on even thoughas we'll seethere are no type declarations in pythonthe syntax of the expressions you run determines the types of objects you create and use in factobject-generation expressions like those in table - are generally where types originate in the python language introducing python object types