{'eggs''eggs!''spam''spam!''ham''ham!'dictionary comprehensions are also useful for initializing dictionaries from keys listsin much the same way as the fromkeys method we met at the end of the preceding sectiond dict fromkeys([' '' '' '] {' ' ' ' ' ' initialize dict from keys { : for in [' '' '' '] {' ' ' ' ' ' samebut with comprehension dict fromkeys('spam' {' 'none' 'none' 'none' 'noneother iterablesdefault value {knone for in 'spam' {' 'none' 'none' 'none' 'nonelike related toolsdictionary comprehensions support additional syntax not shown hereincluding nested loops and if clauses unfortunatelyto truly understand dictionary comprehensionswe need to also know more about iteration statements and concepts in pythonand we don' yet have enough information to address that story well we'll learn much more about all flavors of comprehensions (listsetdictionaryand generatorin and so we'll defer further details until later we'll also revisit the zip built-in we used in this section in more detail in when we explore for loops dictionary views in (and via new methodsin the dictionary keysvaluesand items methods all return view objectswhereas in they return actual result lists this functionality is also available in python but in the guise of the specialdistinct method names listed at the start of this section ( ' normal methods still return simple listsso as to avoid breaking existing code)because of thisi'll refer to this as feature in this section view objects are iterableswhich simply means objects that generate result items one at timeinstead of producing the result list all at once in memory besides being iterabledictionary views also retain the original order of dictionary componentsreflect future changes to the dictionaryand may support set operations on the other handbecause they are not liststhey do not directly support operations like indexing or the list sort methodand do not display their items as normal list when printed (they do show their components as of python but not as listand are still divergence from lists and dictionaries