Set precision : Decimal : Data Type PYTHON TUTORIALS


PYTHON TUTORIALS » Data Type » Decimal »

 

Set precision


import decimal 


decimal.getcontext(  ).prec = 4
print decimal.Decimal(1/ decimal.Decimal(7)



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Data Type
» Decimal