Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python limit float to 2 decimal places

In [1]: x = float(0.4343241231235)

In [2]: round(x, 2)
Out[2]: 0.43
 
PREVIOUS NEXT
Tagged: #python #limit #float #decimal #places
ADD COMMENT
Topic
Name
7+8 =