named tuples accept these by namepositionor both)bob rec('bob' ['dev''mgr']nameagejobs bob namejobs ('bob'['dev''mgr']for both tuples and named tuples tuple assignment (for in bobprint(xprints bob ['dev''mgr'iteration context tuple-unpacking assignment doesn' quite apply to dictionariesshort of fetching and converting keys and values and assuming or imposing an positional ordering on them (dictionaries are not sequences)and iteration steps through keysnot values (notice the dictionary literal form herean alternative to dict)bob {'name''bob''age' 'jobs'['dev''mgr']jobnameage bob values(namejob dict equivalent (but order may vary('bob'['dev''mgr']for in bobprint(bob[ ]prints values for in bob values()print(xprints values step though keysindex values step through values view watch for final rehash of this record representation thread when we see how userdefined classes compare in as we'll findclasses label fields with names toobut can also provide program logic to process the record' data in the same package files you may already be familiar with the notion of fileswhich are named storage compartments on your computer that are managed by your operating system the last major built-in object type that we'll examine on our object types tour provides way to access those files inside python programs in shortthe built-in open function creates python file objectwhich serves as link to file residing on your machine after calling openyou can transfer strings of data to and from the associated external file by calling the returned file object' methods compared to the types you've seen so farfile objects are somewhat unusual they are considered core type because they are created by built-in functionbut they're not numberssequencesor mappingsand they don' respond to expression operatorsthey export only methods for common file-processing tasks most file methods are concerned with performing input from and output to the external file associated with file objectbut other file methods allow us to seek to new position in the fileflush output buffersand so on table - summarizes common file operations tuplesfilesand everything else