|
|
@ -371,7 +371,7 @@ to_exclusive = <range>.stop |
|
|
|
<iter> = chain.from_iterable(<collection>) <span class="hljs-comment"># Empties collections inside a collection in order.</span> |
|
|
|
</code></pre> |
|
|
|
<pre><code class="python language-python hljs"><iter> = islice(<coll>, to_exclusive) <span class="hljs-comment"># Only returns first 'to_exclusive' elements.</span> |
|
|
|
<iter> = islice(<coll>, from_inclusive, …) <span class="hljs-comment"># `to_exclusive [, +step_size]`.</span> |
|
|
|
<iter> = islice(<coll>, from_inclusive, …) <span class="hljs-comment"># `to_exclusive, step_size`.</span> |
|
|
|
</code></pre> |
|
|
|
<div><h2 id="generator"><a href="#generator" name="generator">#</a>Generator</h2><ul> |
|
|
|
<li><strong>Any function that contains a yield statement returns a generator.</strong></li> |
|
|
|