Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit faefa2a

Browse files
committed
Both PEP 201 Lockstep Iteration and SF patch #101030 have been
accepted by the BDFL. Added documentation for zip() builtin.
1 parent bd599b5 commit faefa2a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Doc/lib/libfuncs.tex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,3 +703,12 @@ \section{Built-in Functions \label{built-in-funcs}}
703703
machine (e.g. MS-DOS) or when all of the range's elements are never
704704
used (e.g. when the loop is usually terminated with \keyword{break}).
705705
\end{funcdesc}
706+
707+
\begin{funcdesc}{zip}{seq1\optional{, seq2\optional{, ...}}}
708+
This function returns a list of tuples, where each tuple contains the
709+
i-th element from each of the argument sequences. At least one
710+
sequence is required, otherwise a \exception{TypeError} is raised.
711+
The returned list is truncated in length to the length of the shortest
712+
argument sequence. When the argument sequences are all of the same
713+
length, \function{zip} is similar to \function{map} with an initial
714+
None argument.

0 commit comments

Comments
 (0)