collection data types many items it is to produce-- number that cannot be less than the number of items the iterable can return the random sample(function returns an iterator that will produce up to the specified number of items from the iterable it is given--with no repeats so this version of the program will always produce unique names tuple unpacking str format( in the for in loop we unpack each tuple returned by the zip(function we want to limit the length of each name to charactersand to do this we must first create string with the complete nameand then set the maximum width for that string when we call str format(the second time we left-align each nameand for names shorter than characters we fill with periods the extra period ensures that names that occupy the full field width are still separated from the year by period we will conclude this subsection by mentioning two other iterable-related functionssorted(and reversed(the sorted(function returns list with the items sortedand the reversed(function simply returns an iterator that iterates in the reverse order to the iterator it is given as its argument here is an example of reversed()list(range( )[ list(reversed(range( ))[ the sorted(function is more sophisticatedas these examples showx [for in zip(range(- )range( )range( )) + [- - - - - sorted( [- - - - - sorted(xreverse=true[ - - - - - sorted(xkey=abs[ - - - - - in the preceding snippetthe zip(function returns -tuples(- )(- )and so on the +operator extends listthat isit appends each item in the sequence it is given to the list the first call to sorted(returns copy of the list using the conventional sort order the second call returns copy of the list in the reverse of the conventional sort order the last call to sorted(specifies "keyfunction which we will come back to in moment