Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

format python decimal

number = 3.333333
result = format(number, ".2g")
print("Formatted decimal number result is =>", result)
"Formatted decimal number result is => 3.33"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #format #python #decimal
ADD COMMENT
Topic
Name
2+7 =