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"
 
PREVIOUS NEXT
Tagged: #format #python #decimal
ADD COMMENT
Topic
Name
7+6 =