Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

print on two digit python format

# Call str. format(number) with "{:. 2f}" as str and a float as number to 
# return a string representation of the number with two decimal places. 
# Call print(string) with the formatted float-string as string to print the float.

print("{:. 2f}".format(number))
 
PREVIOUS NEXT
Tagged: #print #digit #python #format
ADD COMMENT
Topic
Name
6+3 =