list( )[ list( items()[(' ' )(' ' )(' ' )for (kvin items()print(kvend=' in addition dictionaries still are iterables themselveswith an iterator that returns successive keys thusit' not often necessary to call keys directly in this contextd {' ' ' ' ' ' iter(dnext( 'anext( 'bdictionaries still produce an iterator returns next key on each iteration for key in dprint(keyend=' still no need to call keys(to iterate but keys is an iterable in toofinallyremember again that because keys no longer returns listthe traditional coding pattern for scanning dictionary by sorted keys won' work in insteadconvert keys views first with list callor use the sorted call on either keys view or the dictionary itselfas follows we saw this in but it' important enough to programmers making the switch to demonstrate againd {' ' ' ' ' ' for in sorted( keys())print(kd[ ]end=' for in sorted( )print(kd[ ]end='"best practicekey sorting other iteration topics as mentioned in this introductionthere is more coverage of both list comprehensions and iterables in in conjunction with functionsand again in when we study classes as you'll see lateruser-defined functions can be turned into iterable generator functionswith yield statements list comprehensions morph into iterable generator expressions when coded in parentheses iterations and comprehensions