<li><strong>For details about sorted(), min() and max() see <ahref="#sortable">sortable</a>.</strong></li>
<li><strong>For details about sorted(), min() and max() see <ahref="#sortable">sortable</a>.</strong></li>
<li><strong>Module <ahref="#operator">operator</a> provides functions itemgetter() and mul() that offer the same functionality as <ahref="#lambda">lambda</a> expressions above.</strong></li>
<li><strong>Module <ahref="#operator">operator</a> provides functions itemgetter() and mul() that offer the same functionality as <ahref="#lambda">lambda</a> expressions above.</strong></li>
</ul>
</ul>
<pre><codeclass="python language-python hljs"><list>.insert(<int>, <el>) <spanclass="hljs-comment"># Inserts item at index and moves the rest to the right.</span>
<el> = <list>.pop([<int>]) <spanclass="hljs-comment"># Removes and returns item at index or from the end.</span>
<int> = <list>.count(<el>) <spanclass="hljs-comment"># Returns number of occurrences. Also works on strings.</span>
<int> = <list>.index(<el>) <spanclass="hljs-comment"># Returns index of the first occurrence or raises ValueError.</span>
<list>.remove(<el>) <spanclass="hljs-comment"># Removes first occurrence of the item or raises ValueError.</span>
<list>.clear() <spanclass="hljs-comment"># Removes all items. Also works on dictionary and set.</span>
<pre><codeclass="python language-python hljs"><list>.insert(<int>, <el>) <spanclass="hljs-comment"># Inserts item at index and moves the rest to the right.</span>
<el> = <list>.pop([<int>]) <spanclass="hljs-comment"># Removes and returns item at index or from the end.</span>
<int> = <list>.count(<el>) <spanclass="hljs-comment"># Returns number of occurrences. Also works on strings.</span>
<int> = <list>.index(<el>) <spanclass="hljs-comment"># Returns index of the first occurrence or raises ValueError.</span>
<list>.remove(<el>) <spanclass="hljs-comment"># Removes first occurrence of the item or raises ValueError.</span>
<list>.clear() <spanclass="hljs-comment"># Removes all items. Also works on dictionary and set.</span>
</code></pre>
</code></pre>
<div><h2id="dictionary"><ahref="#dictionary"name="dictionary">#</a>Dictionary</h2><pre><codeclass="python language-python hljs"><view> = <dict>.keys() <spanclass="hljs-comment"># Coll. of keys that reflects changes.</span>
<div><h2id="dictionary"><ahref="#dictionary"name="dictionary">#</a>Dictionary</h2><pre><codeclass="python language-python hljs"><view> = <dict>.keys() <spanclass="hljs-comment"># Coll. of keys that reflects changes.</span>
<view> = <dict>.values() <spanclass="hljs-comment"># Coll. of values that reflects changes.</span>
<view> = <dict>.values() <spanclass="hljs-comment"># Coll. of values that reflects changes.</span>
<div><h2id="tuple"><ahref="#tuple"name="tuple">#</a>Tuple</h2><p><strong>Tuple is an immutable and hashable list.</strong></p><pre><codeclass="python language-python hljs"><tuple> = () <spanclass="hljs-comment"># Empty tuple.</span>
<div><h2id="tuple"><ahref="#tuple"name="tuple">#</a>Tuple</h2><p><strong>Tuple is an immutable and hashable list.</strong></p><pre><codeclass="python language-python hljs"><tuple> = () <spanclass="hljs-comment"># Empty tuple.</span>