* **When both rounding up and rounding down are possible, the one that returns result with even last digit is chosen. That makes `'{6.5:.0f}'` a `'6'` and `'{7.5:.0f}'` an `'8'`.**
### Ints
```python
@ -1140,7 +1140,7 @@ class Counter:
```
#### Python has many different iterator objects:
* **Iterators returned by the [iter()](#iterator) function, such as list\_iterator and set\_iterator.**
* **Sequence iterators returned by the [iter()](#iterator) function, such as list\_iterator and set\_iterator.**
* **Objects returned by the [itertools](#itertools) module, such as count, repeat and cycle.**
* **Generators returned by the [generator functions](#generator) and [generator expressions](#comprehensions).**
* **File objects returned by the [open()](#open) function, etc.**
<pre><codeclass="python language-python hljs"><list> = <str>.split() <spanclass="hljs-comment"># Splits on one or more whitespace characters.</span>
<list> = <str>.split(sep=<spanclass="hljs-keyword">None</span>, maxsplit=<spanclass="hljs-number">-1</span>) <spanclass="hljs-comment"># Splits on 'sep' str at most 'maxsplit' times.</span>
<list> = <str>.splitlines(keepends=<spanclass="hljs-keyword">False</span>) <spanclass="hljs-comment"># Splits on \n,\r,\r\n. Keeps them if 'keepends'.</span>
<list> = <str>.splitlines(keepends=<spanclass="hljs-keyword">False</span>) <spanclass="hljs-comment"># Splits on [\n\r\f\v\x1c\x1d\x1e\x85] and '\r\n'.</span>
<str> = <str>.join(<coll_of_strings>) <spanclass="hljs-comment"># Joins elements using string as a separator.</span>
</code></pre>
<pre><codeclass="python language-python hljs"><bool> = <sub_str><spanclass="hljs-keyword">in</span><str><spanclass="hljs-comment"># Checks if string contains a substring.</span>
<li><strong>By default digits, alphanumerics and whitespaces from all alphabets are matched, unless <codeclass="python hljs"><spanclass="hljs-string">'flags=re.ASCII'</span></code> argument is used.</strong></li>
<li><strong>By default, decimal characters, alphanumerics and whitespaces from all alphabets are matched unless <codeclass="python hljs"><spanclass="hljs-string">'flags=re.ASCII'</span></code> argument is used.</strong></li>
<li><strong>As shown below, it restricts special sequence matches to <codeclass="python hljs"><spanclass="hljs-string">'[\x00-\x7f]'</span></code> and prevents <codeclass="python hljs"><spanclass="hljs-string">'\s'</span></code> from accepting <codeclass="python hljs"><spanclass="hljs-string">'[\x1c\x1d\x1e\x1f]'</span></code>.</strong></li>
<li><strong>Use a capital letter for negation.</strong></li>
</ul><pre><codeclass="python language-python hljs"><spanclass="hljs-string">'\d'</span> == <spanclass="hljs-string">'[0-9]'</span><spanclass="hljs-comment"># Matches any digit.</span>
<spanclass="hljs-string">'\w'</span> == <spanclass="hljs-string">'[a-zA-Z0-9_]'</span><spanclass="hljs-comment"># Matches any alphanumeric.</span>
<spanclass="hljs-string">'\s'</span> == <spanclass="hljs-string">'[ \t\n\r\f\v]'</span><spanclass="hljs-comment"># Matches any whitespace.</span>
<div><h4id="comparisonofpresentationtypes">Comparison of presentation types:</h4><pre><codeclass="text language-text">┏━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┓
<div><h4id="comparisonofpresentationtypes">Comparison of presentation types:</h4><pre><codeclass="text language-text">┏━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┓
<li><strong>When both rounding up and rounding down are possible, the one that returns result with even last digit is chosen. That makes <codeclass="python hljs"><spanclass="hljs-string">'{6.5:.0f}'</span></code> a <codeclass="python hljs"><spanclass="hljs-string">'6'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'{7.5:.0f}'</span></code> an <codeclass="python hljs"><spanclass="hljs-string">'8'</span></code>.</strong></li>
<div><h4id="pythonhasmanydifferentiteratorobjects">Python has many different iterator objects:</h4><ul>
<li><strong>Iterators returned by the <ahref="#iterator">iter()</a> function, such as list_iterator and set_iterator.</strong></li>
<li><strong>Sequence iterators returned by the <ahref="#iterator">iter()</a> function, such as list_iterator and set_iterator.</strong></li>
<li><strong>Objects returned by the <ahref="#itertools">itertools</a> module, such as count, repeat and cycle.</strong></li>
<li><strong>Generators returned by the <ahref="#generator">generator functions</a> and <ahref="#comprehensions">generator expressions</a>.</strong></li>
<li><strong>File objects returned by the <ahref="#open">open()</a> function, etc.</strong></li>