|
|
@ -241,7 +241,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.</span> |
|
|
|
<list>.clear() <span class="hljs-comment"># Removes all items. Also works on dict and set.</span> |
|
|
|
</code></pre> |
|
|
|
<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> |
|
|
@ -419,7 +419,8 @@ Point(x=<span class="hljs-number">1</span>, y=<span class="hljs-number">2</span> |
|
|
|
<pre><code class="python language-python hljs"><str> = <Match>.group() <span class="hljs-comment"># Whole match.</span> |
|
|
|
<str> = <Match>.group(<span class="hljs-number">1</span>) <span class="hljs-comment"># Part in first bracket.</span> |
|
|
|
<tuple> = <Match>.groups() <span class="hljs-comment"># All bracketed parts.</span> |
|
|
|
<int> = <Match>.start() <span class="hljs-comment"># Start index of a match.</span> |
|
|
|
</code></pre> |
|
|
|
<pre><code class="python language-python hljs"><int> = <Match>.start() <span class="hljs-comment"># Start index of a match.</span> |
|
|
|
<int> = <Match>.end() <span class="hljs-comment"># Exclusive end index of a match.</span> |
|
|
|
</code></pre> |
|
|
|
<h3 id="specialsequences">Special Sequences</h3> |
|
|
|
xxxxxxxxxx