Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

fstring number format python

num = 10.4999
print(f"The formatted number is {num:.2f}")
# output: The formatted number is 10.49
 
PREVIOUS NEXT
Tagged: #fstring #number #format #python
ADD COMMENT
Topic
Name
6+9 =