From 4fcdb90d56c976d8d75868b17f5d75f360ce9330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E5=B0=8F=E6=BB=A1?= <59760263+decodejerome@users.noreply.github.com> Date: Mon, 6 Jul 2020 17:34:30 +0800 Subject: [PATCH] =?UTF-8?q?009=20353=E8=A1=8C=E7=AC=A6=E5=8F=B7=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 加号应改为减号。 --- ...\236\204\344\271\213\345\255\227\347\254\246\344\270\262.md" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/\347\254\254009\350\257\276\357\274\232\345\270\270\347\224\250\346\225\260\346\215\256\347\273\223\346\236\204\344\271\213\345\255\227\347\254\246\344\270\262.md" "b/\347\254\254009\350\257\276\357\274\232\345\270\270\347\224\250\346\225\260\346\215\256\347\273\223\346\236\204\344\271\213\345\255\227\347\254\246\344\270\262.md" index ddb81ad..b6c3e2e 100644 --- "a/\347\254\254009\350\257\276\357\274\232\345\270\270\347\224\250\346\225\260\346\215\256\347\273\223\346\236\204\344\271\213\345\255\227\347\254\246\344\270\262.md" +++ "b/\347\254\254009\350\257\276\357\274\232\345\270\270\347\224\250\346\225\260\346\215\256\347\273\223\346\236\204\344\271\213\345\255\227\347\254\246\344\270\262.md" @@ -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位 |