Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 第009课:常用数据结构之字符串.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ print(f'{a} * {b} = {a * b}')
| ----------- | ---------- | ------------- | ---- |
| `3.1415926` | `{:.2f}` | `'3.14'` | 保留小数点后两位 |
| `3.1415926` | `{:+.2f}` | `'+3.14'` | 带符号保留小数点后两位 |
| `-1` | `{:+.2f}` | `'-1.00'` | 带符号保留小数点后两位 |
| `-1` | `{:-.2f}` | `'-1.00'` | 带符号保留小数点后两位 |
| `3.1415926` | `{:.0f}` | `'3'` | 不带小数 |
| `123` | `{:0>10d}` | `0000000123` | 左边补`0`,补够10位 |
| `123` | `{:x<10d}` | `123xxxxxxx` | 右边补`x` ,补够10位 |
Expand Down