Jul-27-2018, 05:15 PM
Hi, I'm having a trouble with new Python 3.7 when use next code, I have got next raise Exception StopIteration, but I have not it when use 2.7.
def _zip(*args): iters = list(map(iter, args)) while iters: res = [next(i) for i in iters] yield tuple(res) if __name__ == '__main__': s1, s2 = 'abc', 'xyz123' print(list(_zip(s1, s2)))thanks in advance.