Question: IN PYTHON: --------------------- f. The myzip generator takes any number of iterables (call the number n) it produces n-tuples of the first value in each
IN PYTHON:
---------------------

f. The myzip generator takes any number of iterables (call the number n) it produces n-tuples of the first value in each iterable, the second value of each iterable, etc; if one iterable is exhausted before all the others, its position in the n tuple should store None. For example for i in myzip ('abcde', 'fg', 'hijk'): print(i,end- prints the 5 3-tuples ('a',','h') ('b','g','i') ('c'None, ' ('d' None, 'k') ('e',None, None) You may not use the zip function. Hint: I called iter and next directly, using a list that I iterated over with a for loop in while loop, counting how many calls to next raised exceptions. You can create lists/tuples whose length is the number of arguments:3 for the call to myzip above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
