Selecting the Right Dictionary for the Job
Selecting the Right Dictionary for the Job. So far, you’ve learned about the subtle differences between
dict. You’ve learned that, even though regular dictionaries have been ordered data structures since Python 3.6, there is still some value in using
OrderedDict because of a set of useful features that aren’t present in standard dictionaries.
This summarizes some of the main differences between
dict that you should consider when you need to choose a dictionary class to solve a problem or to implement a specific algorithm. In general, if the order of items in the dictionary is vital or even important for your code to work correctly, then your first look should be towards
Become a Member to join the conversation.