Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd9b5c2 commit ab425aaCopy full SHA for ab425aa
1 file changed
Doc/library/itertools.rst
@@ -588,7 +588,10 @@ loops that truncate the stream.
588
589
.. function:: tee(iterable, n=2)
590
591
- Return *n* independent iterators from a single iterable. Equivalent to::
+ Return *n* independent iterators from a single iterable.
592
+
593
+ The following Python code helps explain what *tee* does (although the actual
594
+ implementation is more complex and uses only a single underlying FIFO queue)::
595
596
def tee(iterable, n=2):
597
it = iter(iterable)
0 commit comments