@ -250,7 +250,7 @@ product_of_elems = functools.reduce(<span class="hljs-keyword">lambda</span> out
list_of_chars = list(<str>)
</code></pre>
<ul>
<li><strong>Check out module <ahref="#operator">operator</a>for alternative versions of examples.</strong></li>
<li><strong>Module <ahref="#operator">operator</a>provides functions itemgetter() and mul() that offer the same functionality as lambda expressions above.</strong></li>
</ul>
<pre><codeclass="python language-python hljs"><int> = <list>.count(<el>) <spanclass="hljs-comment"># Returns number of occurrences. Also works on strings.</span>
index = <list>.index(<el>) <spanclass="hljs-comment"># Returns index of first occurrence or raises ValueError.</span>