File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ index = <list>.index(<el>) # Returns first index of item.
59
59
< list > .insert(index, < el> ) # Inserts item at index and moves the rest to the right.
60
60
< el> = < list > .pop([index]) # Removes and returns item at index or from the end.
61
61
< list > .remove(< el> ) # Removes first occurrence of item or raises ValueError.
62
- < list > .clear() # Removes all items.
62
+ < list > .clear() # Removes all items. Also works on dict and set.
63
63
```
64
64
65
65
@@ -324,6 +324,9 @@ import re
324
324
< str > = < Match> .group() # Whole match.
325
325
< str > = < Match> .group(1 ) # Part in first bracket.
326
326
< tuple > = < Match> .groups() # All bracketed parts.
327
+ ```
328
+
329
+ ``` python
327
330
< int > = < Match> .start() # Start index of a match.
328
331
< int > = < Match> .end() # Exclusive end index of a match.
329
332
```
Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ <h2 id="list"><a href="#list" name="list">#</a>List</h2>
241
241
<list>.insert(index, <el>) < span class ="hljs-comment "> # Inserts item at index and moves the rest to the right.</ span >
242
242
<el> = <list>.pop([index]) < span class ="hljs-comment "> # Removes and returns item at index or from the end.</ span >
243
243
<list>.remove(<el>) < span class ="hljs-comment "> # Removes first occurrence of item or raises ValueError.</ span >
244
- <list>.clear() < span class ="hljs-comment "> # Removes all items.</ span >
244
+ <list>.clear() < span class ="hljs-comment "> # Removes all items. Also works on dict and set. </ span >
245
245
</ code > </ pre >
246
246
< h2 id ="dictionary "> < a href ="#dictionary " name ="dictionary "> #</ a > Dictionary</ h2 >
247
247
< 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 @@ <h3 id="matchobject">Match Object</h3>
419
419
< pre > < code class ="python language-python hljs "> <str> = <Match>.group() < span class ="hljs-comment "> # Whole match.</ span >
420
420
<str> = <Match>.group(< span class ="hljs-number "> 1</ span > ) < span class ="hljs-comment "> # Part in first bracket.</ span >
421
421
<tuple> = <Match>.groups() < span class ="hljs-comment "> # All bracketed parts.</ span >
422
- <int> = <Match>.start() < span class ="hljs-comment "> # Start index of a match.</ span >
422
+ </ code > </ pre >
423
+ < pre > < code class ="python language-python hljs "> <int> = <Match>.start() < span class ="hljs-comment "> # Start index of a match.</ span >
423
424
<int> = <Match>.end() < span class ="hljs-comment "> # Exclusive end index of a match.</ span >
424
425
</ code > </ pre >
425
426
< h3 id ="specialsequences "> Special Sequences</ h3 >
You can’t perform that action at this time.
0 commit comments