|
@ -281,11 +281,9 @@ import re |
|
|
'187' |
|
|
'187' |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
#### Binary, at least 10 spaces wide, filled with zeros: |
|
|
#### Float presentation types: |
|
|
```python |
|
|
* `'e'` - Exponent |
|
|
>>> f'{123:010b}' |
|
|
* `'f'` - Fixed point: .<precision>f |
|
|
'0001111011' |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
#### Integer presentation types: |
|
|
#### Integer presentation types: |
|
|
* `'b'` - Binary |
|
|
* `'b'` - Binary |
|
@ -294,11 +292,16 @@ import re |
|
|
* `'x'` - Hex |
|
|
* `'x'` - Hex |
|
|
* `'X'` - HEX |
|
|
* `'X'` - HEX |
|
|
|
|
|
|
|
|
|
|
|
#### Binary, at least 10 spaces wide, filled with zeros: |
|
|
|
|
|
```python |
|
|
|
|
|
>>> f'{123:010b}' |
|
|
|
|
|
'0001111011' |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
### Text Wrap |
|
|
### Text Wrap |
|
|
```python |
|
|
```python |
|
|
import textwrap |
|
|
import textwrap |
|
|
textwrap.wrap(text, width) |
|
|
<list> = textwrap.wrap(text, width) |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xxxxxxxxxx