DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
5+3 =
Submit