Is the python's list() function destructive?

Viewed 41

When I use list() to a zip object two times:

l=[2,1,3]

l2=["a","b","c"]

ll=zip(l,l2)

print(list(ll))

print(list(ll))

I get the output:

[(2, 'a'), (1, 'b'), (3, 'c')]
[]

Why do the outputs change? Is list() really a destructive function?

0 Answers
Related