[issue32242] loop in loop with with 'zip'ped object misbehaves in py3.6
Ronald Oussoren
report at bugs.python.org
Thu Dec 7 09:29:48 EST 2017
Ronald Oussoren <ronaldoussoren at mac.com> added the comment:
If the nested loop is the issue the Python 3 version behaves as expected.
A difference between python2 and python3 is that the zip() builtin returns a list on python2 and an iterator on python3. This explains the difference in results in running the code on the two versions.
To get the same behaviour on Python 2 and Python 3 use "list(zip(j, k))".
----------
nosy: +ronaldoussoren
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32242>
_______________________________________
More information about the Python-bugs-list
mailing list