in below code i want test zip()
method. in one example i iterate in b (zip output) and the second convert b to the set.but when i convert the b to set strange thing happened. the ones that iterate in b, print it output is empty list. but when i comment the c = set(b)
and print(c)
the output is correct what happen and why? can you explain for me.
l1 = range(10)
l2 = range(10)
b = zip(l1,l2)
c = set(b)
print(c)
result = [(x,y) for x,y in b]
print(len(result))