filmov
tv
Python 74: Formatting a floating point number to 2 decimal places using the format() method

Показать описание
Displaying/formatting a floating point number to 2 decimal places using the format() method.
.2f specifies two decimal places, the number is displayed rounded to two decimals, but the original number remains unchanged.
.2f specifies two decimal places, the number is displayed rounded to two decimals, but the original number remains unchanged.