>>> x = [1, 2, 3] >>> y = [4, 5, 6] >>> zipped = zip(x, y) >>> list(zipped) [(1, 4), (2, 5), (3, 6)] >>> x2, y2 = zip(*zip(x, y)) >>> x == list(x2) and y == list(y2) True
My problem is >>> x2, y2 = zip(*zip(x, y)). zip return an iterator but x2 and y2 are different? I really need detail explanation about this line. -- https://mail.python.org/mailman/listinfo/python-list