I found an interesting function in Julia called zip. zip orders the calls to its subiterators in such a way that stateful iterators will not advance when another iterator finishes in the current iteration.
I would like to create a similar kind of code that gives output similar to Julia's zip.
For example, say a=1:5 and b=["e","d","b","c","a"], I would like to have an output where each value of both datasets is selected like this:
(1,"e"),(2,"d"), (3,"b") and so on.
Is there any possible way to do this in Python?
zip(range(1,6), ["e","d","b","c","a"])