the sorted(function around the dictionary keys(method this tells python to list all keys in the dictionary and sort that list before looping through it the output shows everyone who took the poll with the names displayed in orderedwardthank you for taking the poll jenthank you for taking the poll philthank you for taking the poll sarahthank you for taking the poll looping through all values in dictionary if you are primarily interested in the values that dictionary containsyou can use the values(method to return list of values without any keys for examplesay we simply want list of all languages chosen in our programming language poll without the name of the person who chose each languagefavorite_languages 'jen''python''sarah'' ''edward''ruby''phil''python'print("the following languages have been mentioned:"for language in favorite_languages values()print(language title()the for statement here pulls each value from the dictionary and stores it in the variable language when these values are printedwe get list of all chosen languagesthe following languages have been mentionedpython python ruby this approach pulls all the values from the dictionary without checking for repeats that might work fine with small number of valuesbut in poll with large number of respondentsthis would result in very repetitive list to see each language chosen without repetitionwe can use set set is similar to list except that each item in the set must be uniquefavorite_languages 'jen''python''sarah'' ''edward''ruby'dictionaries