|
|
@ -253,7 +253,7 @@ list_of_chars = list(<str>) |
|
|
|
<list>.insert(index, <el>) <span class="hljs-comment"># Inserts item at index and moves the rest to the right.</span> |
|
|
|
<el> = <list>.pop([index]) <span class="hljs-comment"># Removes and returns item at index or from the end.</span> |
|
|
|
<list>.remove(<el>) <span class="hljs-comment"># Removes first occurrence of item or raises ValueError.</span> |
|
|
|
<list>.clear() <span class="hljs-comment"># Removes all items. Also works on dict and set.</span> |
|
|
|
<list>.clear() <span class="hljs-comment"># Removes all items. Also works on dictionary and set.</span> |
|
|
|
</code></pre> |
|
|
|
<div><h2 id="dictionary"><a href="#dictionary" name="dictionary">#</a>Dictionary</h2><pre><code class="python language-python hljs"><view> = <dict>.keys() <span class="hljs-comment"># Coll. of keys that reflects changes.</span> |
|
|
|
<view> = <dict>.values() <span class="hljs-comment"># Coll. of values that reflects changes.</span> |
|
|
|