Vishu Viswanathan <viswanatha...@gmail.com> added the comment:

Thanks for the fast response and clarification. Now I can run my code made
for  py2.7  also run in py3.6
I should search and read documentation before reporting.

Thanks

On Thu, Dec 7, 2017 at 8:03 PM, Steven D'Aprano <rep...@bugs.python.org>
wrote:

>
> Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
>
> I decided to run the code in 3.5 and 2.7, and now that I know what I'm
> looking for, I can see the results buried in the Anaconda notebook.
>
> This is not a bug, zip has been changed in Python 3 to return an iterator
> instead of a list. To get the same results as Python 2.7, change the line:
>
> z = zip(j, k)
>
> to:
>
> z = list(zip(j, k))
>
> To get the same results in 2.7 as in 3, change it to:
>
> z = iter(zip(j, k))
>
> This is documented and is not a bug.
>
> https://docs.python.org/3.0/whatsnew/3.0.html#views-and-
> iterators-instead-of-lists
>
> https://docs.python.org/3/library/functions.html#zip
>
> ----------
>
> _______________________________________
> Python tracker <rep...@bugs.python.org>
> <https://bugs.python.org/issue32242>
> _______________________________________
>

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32242>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to