File tree Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -347,12 +347,15 @@ Format
347
347
{' abcde' :10.3 } # 'abc '
348
348
```
349
349
350
- ### Number Options
350
+ ### Float Options
351
351
``` python
352
352
{1.23456 :.3f} # '1.235'
353
353
{1.23456 :10. 3f } # ' 1.235'
354
+ {1.23456 :10. 3e } # ' 1.235e+00'
355
+ {1.23456 :10.3 % } # ' 123.456%'
354
356
```
355
357
358
+ ### Int Options
356
359
``` python
357
360
{ 123456 :10 ,} # ' 123,456'
358
361
{ 123456 :10_ } # ' 123_456'
@@ -363,22 +366,11 @@ Format
363
366
```
364
367
365
368
``` python
366
- {65 :c} # 'A '
367
- {3 : 08b } # '00000011' -> Binary with leading zeros.
368
- {3 :0 < 8b } # '11000000' -> Binary with trailing zeros.
369
+ {90 :c} # 'Z '
370
+ {90 :X } # '5A'
371
+ {3 :08b } # '00000011'
369
372
```
370
373
371
- #### Float presentation types:
372
- * ** ` 'f' ` - Fixed point: ` .<precision>f ` **
373
- * ** ` '%' ` - Percent: ` .<precision>% ` **
374
- * ** ` 'e' ` - Exponent**
375
-
376
- #### Integer presentation types:
377
- * ** ` 'c' ` - character**
378
- * ** ` 'b' ` - binary**
379
- * ** ` 'x' ` - hex**
380
- * ** ` 'X' ` - HEX**
381
-
382
374
383
375
Numbers
384
376
-------
You can’t perform that action at this time.
0 commit comments