set decimal place

kwsiew at tm.net.my kwsiew at tm.net.my
Tue Dec 25 18:59:12 EST 2001


is there a way(or any function) to set decimal place in python(to any
decimal place I want)
example :
1)17.0/4 = 4.25 (but I want it to be 4.3)
2)10.0/3 = 3.3333333333333335 (I want 3.3333 - 4 decimal place)
3) 20.0/7 = 2.8571428571428572( I want 2.86 or 2.85714)


thank you
rgds,
SKW






More information about the Python-list mailing list