Browse Source

Iterator

pull/123/head
Jure Šorn 4 years ago
parent
commit
d5a242aedb
2 changed files with 2 additions and 2 deletions
  1. 2
      README.md
  2. 2
      index.html

2
README.md

@ -216,7 +216,7 @@ from itertools import count, repeat, cycle, chain, islice
```python
<iter> = islice(<coll>, to_exclusive) # Only returns first 'to_exclusive' elements.
<iter> = islice(<coll>, from_inclusive, …) # `to_exclusive [, +step_size]`.
<iter> = islice(<coll>, from_inclusive, …) # `to_exclusive, step_size`.
```

2
index.html

@ -371,7 +371,7 @@ to_exclusive = &lt;range&gt;.stop
&lt;iter&gt; = chain.from_iterable(&lt;collection&gt;) <span class="hljs-comment"># Empties collections inside a collection in order.</span>
</code></pre>
<pre><code class="python language-python hljs">&lt;iter&gt; = islice(&lt;coll&gt;, to_exclusive) <span class="hljs-comment"># Only returns first 'to_exclusive' elements.</span>
&lt;iter&gt; = islice(&lt;coll&gt;, from_inclusive, …) <span class="hljs-comment"># `to_exclusive [, +step_size]`.</span>
&lt;iter&gt; = islice(&lt;coll&gt;, 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>

Loading…
Cancel
Save