Pictured above, f list became the empty list,
Originally found when using zip () function,
CodePudding user response:
Range zip enumerate generated is iterator object, such as they are all one-time after traversal ends, unlike fixed container list a tuple can traverse many times, so when you first use the list (e), e traverse cannot, it is [] gTo test the e when there are elements within, you can print (next) (e) look at it
CodePudding user response:
Zip () function has been explained,After x in python3., zip () returns the generator, can only single traversal, so the second g=list (e), g is empty,
In previous versions of the zip () returns the tuple, can be repeated traversal,
With the old version of PYTHON you try to see,