In the following code, I am trying to unzip a zip object.
x = [1, 2, 3]; y = ['a', 'b', 'c']
z = zip(x, y)
#print(list(z)) #2nd print statement returns [] if this line is uncommented
unzip = zip(*z)
print(list(unzip)) #returns [(1, 2, 3), ('a', 'b', 'c')]
If I keep the code as it is, it works normal. But on uncommenting the 1st print statement, the 2nd print statement returns an empty list instead of returning the unzipped list object. Why?