Zip

from inspect import signature

def my_zip(*lists):
sig = signature(my_zip)
my_set = set()
my_tuple = ()
i = 0
j = 0

print(sig)

while i < 3:
for list in lists:
my_tuple = my_tuple + (list[j], )
j += 1
my_set.add(my_tuple)
my_tuple = ()
yield my_set
i += 1

x = my_zip(['1', '3', '5'], ['6', '7', '8'], ['11', '12', '13'])
print(next(x))
print(next(x))
print(next(x))

Related Posts

Join the Discussion

Your email address will not be published. Required fields are marked *

Back to top