Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

print two digits after decimal python

float = 2.154327
format_float = "{:.2f}".format(float)
print(format_float)
Source by pythonguides.com #
 
PREVIOUS NEXT
Tagged: #print #digits #decimal #python
ADD COMMENT
Topic
Name
5+7 =