Browse Source

Regex, enum

pull/10/head
Jure Šorn 5 years ago
parent
commit
52c2e67951
1 changed files with 5 additions and 0 deletions
  1. 5
      README.md

5
README.md

@ -265,6 +265,9 @@ Regex
-----
```python
import re
```
```python
<str> = re.sub(<regex>, new, text, count=0) # Substitutes all occurrences.
<list> = re.findall(<regex>, text) # Returns all occurrences.
<list> = re.split(<regex>, text, maxsplit=0) # Use brackets in regex to keep the matches.
@ -774,7 +777,9 @@ Enum
----
```python
from enum import Enum, auto
```
```python
class <enum_name>(Enum):
<member_name_1> = <value_1>
<member_name_2> = <value_2_a>, <value_2_b>

Loading…
Cancel
Save