#3522: zip() returns an iterator.

This commit is contained in:
Georg Brandl 2008-08-08 06:44:14 +00:00
parent 676cce3b4b
commit 409c9d7184
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ A more verbose version of this snippet shows the flow explicitly::
In real world, you should prefer builtin functions to complex flow statements.
The :func:`zip` function would do a great job for this use case::
>>> zip(*mat)
>>> list(zip(*mat))
[(1, 4, 7), (2, 5, 8), (3, 6, 9)]
See :ref:`tut-unpacking-arguments` for details on the asterisk in this line.