Skip to content

Commit 52c2e67

Browse files
committed
Regex, enum
1 parent 83bd4fd commit 52c2e67

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,9 @@ Regex
265265
-----
266266
```python
267267
import re
268+
```
269+
270+
```python
268271
<str> = re.sub(<regex>, new, text, count=0) # Substitutes all occurrences.
269272
<list> = re.findall(<regex>, text) # Returns all occurrences.
270273
<list> = re.split(<regex>, text, maxsplit=0) # Use brackets in regex to keep the matches.
@@ -774,7 +777,9 @@ Enum
774777
----
775778
```python
776779
from enum import Enum, auto
780+
```
777781

782+
```python
778783
class <enum_name>(Enum):
779784
<member_name_1> = <value_1>
780785
<member_name_2> = <value_2_a>, <value_2_b>

0 commit comments

Comments
 (0)