f string float format

48

f string float format -

>>> a = 10.1234
>>> f'{a:.2f}'
'10.12'

f string decimal places -

>>> a = 10.1234
>>> f'{a:.2f}'
'10.12'

Comments

Submit
0 Comments