comprehensions (passed to tuplestep through the passed-in sequences to pull out arguments in parallel when they're runthe results are as before most strikinglygenerators and iterators seem to run rampant in this example the arguments passed to min and max are generator expressionswhich run to completion before the nested comprehensions begin iterating moreoverthe nested list comprehensions employ two levels of delayed evaluation--the python range built-in is an iterableas is the generator expression argument to tuple in factno results are produced here until the square brackets of the list comprehensions request values to place in the result list--they force the comprehensions and generators to run to turn these functions themselves into generators instead of list buildersuse parentheses instead of square brackets again here' the case for our zipusing generatorsdef myzip(*seqs)minlen min(len(sfor in seqsreturn (tuple( [ifor in seqsfor in range(minlen) 'abc''xyz print(list(myzip( ))go[(' '' ')(' '' ')(' '' ')in this caseit takes list call to activate the generators and other iterables to produce their results experiment with these on your own for more details developing further coding alternatives is left as suggested exercise (see also the sidebar "why you will careone-shot iterationson page for investigation of one such optionwatch for more yield examples in where we'll use it in conjunction with the __iter__ operator overloading method to implement user-defined iterable objects in an automated fashion the state retention of local variables in this role serves as an alternative to class attributes in the same spirit as the closure functions of as we'll seethoughthis technique combines classes and functional tools instead of posing paradigm alternative why you will careone-shot iterations in we saw how some built-ins (like mapsupport only single traversal and are empty after it occursand promised to show you an example of how that can become subtle but important in practice now that we've studied few more iteration topicsi can make good on this promise consider the following clever alternative coding for this zip emulation examplesadapted from one in python' manuals at the time wrote these wordsdef myzip(*args)iters map(iterargswhile itersgenerator functions and expressions