Why aren't two `zip` objects equal if the underlying data is equal?
Advertisements Suppose we create two zips from lists and tuples, and compare them, like so: >>> x1=[1,2,3] >>> y1=[4,5,6] >>> x2=(1,2,3) >>> y2=(4,5,6) >>> w1=zip(x1,y1) >>> w2=zip(x2,y2) >>> w1 == w2 False But using list on each zip shows the same result: >>> list(w1) [(1, 4), (2, 5), (3, 6)] >>> list(w2) [(1, 4), (2,… Read More Why aren't two `zip` objects equal if the underlying data is equal?