Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python format only 1 decimal place

>>> "{0:0.1f}".format(45.34531)
'45.3'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #format #decimal #place
ADD COMMENT
Topic
Name
2+4 =