keep track of the order in which you add key-value pairs if you're creating dictionary and want to keep track of the order in which key-value pairs are addedyou can use the ordereddict class from the collections module instances of the ordereddict class behave almost exactly like dictionaries except they keep track of the order in which key-value pairs are added let' revisit the favorite_languages py example from this time we'll keep track of the order in which people respond to the pollfavorite_ from collections import ordereddict languages py favorite_languages ordereddict( favorite_languages['jen''pythonfavorite_languages['sarah''cfavorite_languages['edward''rubyfavorite_languages['phil''pythonx for namelanguage in favorite_languages items()print(name title("' favorite language is language title("we begin by importing the ordereddict class from the module collections at at we create an instance of the ordereddict class and store this instance in favorite_languages notice there are no curly bracketsthe call to ordereddict(creates an empty ordered dictionary for us and stores it in favorite_languages we then add each name and language to favorite_languages one at time now when we loop through favorite_languages at xwe know we'll always get responses back in the order they were addedjen' favorite language is python sarah' favorite language is edward' favorite language is ruby phil' favorite language is python this is great class to be aware of because it combines the main benefit of lists (retaining your original orderwith the main feature of dictionaries (connecting pieces of informationas you begin to model real-world situations that you care aboutyou'll probably come across situation where an ordered dictionary is exactly what you need as you learn more about the standard libraryyou'll become familiar with number of modules like this that help you handle common situations note you can also download modules from external sources you'll see number of these examples in part iiwhere we'll need external modules to complete each project classes