The following code:
coords = zip([0], [0])
for a, b in list(coords):
print("{}, {}".format(a, b))
outputs 0, 0
as expected. But the following code:
coords = zip([0], [0])
mylist = list(coords)
for a, b in list(coords):
print("{}, {}".format(a, b))
outputs nothing. Why is that the case?
Python version:
Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.