B.2. Mapping in Python (dict and OrderedDict)

Hash table (or mapping) data structures are built into Python in dict objects. But a dict doesn’t enforce a consistent key order, so the collections module, in the standard Python library, contains an OrderedDict that allows you to store key-value pairs in a consistent order that you can control (based on when you insert a new key).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset