dictionaries here' what the output looks likejan chuck annie againthe keys are in no particular order we can use this pattern to implement the various loop idioms that we have described earlier for example if we wanted to find all the entries in dictionary with value above tenwe could write the following codecounts 'chuck 'annie 'jan' for key in countsif counts[key print(keycounts[key]the for loop iterates through the keys of the dictionaryso we must use the index operator to retrieve the corresponding value for each key here' what the output looks likejan annie we see only the entries with value above if you want to print the keys in alphabetical orderyou first make list of the keys in the dictionary using the keys method available in dictionary objectsand then sort that list and loop through the sorted listlooking up each key and printing out key-value pairs in sorted order as followscounts 'chuck 'annie 'jan' lst list(counts keys()print(lstlst sort(for key in lstprint(keycounts[key]here' what the output looks like['jan''chuck''annie'annie chuck jan first you see the list of keys in unsorted order that we get from the keys method then we see the key-value pairs in order from the for loop