which they were storedeven when looping through dictionary python doesn' care about the order in which key-value pairs are storedit tracks only the connections between individual keys and their values looping through all key-value pairs works particularly well for dictionaries like the favorite_languages py example on page which stores the same kind of information for many different keys if you loop through the favorite_languages dictionaryyou get the name of each person in the dictionary and their favorite programming language because the keys always refer to person' name and the value is always languagewe'll use the variables name and language in the loop instead of key and value this will make it easier to follow what' happening inside the loopfavorite_ languages py favorite_languages 'jen''python''sarah'' ''edward''ruby''phil''python' for namelanguage in favorite_languages items() print(name title("' favorite language is language title("the code at tells python to loop through each key-value pair in the dictionary as it works through each pair the key is stored in the variable nameand the value is stored in the variable language these descriptive names make it much easier to see what the print statement at is doing nowin just few lines of codewe can display all of the information from the polljen' favorite language is python sarah' favorite language is phil' favorite language is python edward' favorite language is ruby this type of looping would work just as well if our dictionary stored the results from polling thousand or even million people looping through all the keys in dictionary the keys(method is useful when you don' need to work with all of the values in dictionary let' loop through the favorite_languages dictionary and print the names of everyone who took the pollfavorite_languages 'jen''python''sarah'' ''edward''ruby''phil''python'