In Python is possible to combine 2 followings concepts - named arguments and float formatting?
'{0:.2f}'.format(pi)
and
'{first} {last}'.format(first='Hodor', last='Hodor!')
https://stackoverflow.com/a/8940627/2230844
https://pyformat.info/#named_placeholders
'{value:.2f}'.format(value=pi)
>>> pi=3.14159
>>> print('{number:.2f}'.format(number=pi))
3.14
>>>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With