SyntaxFix
Write A Post
Hire A Developer
Questions
You could use the round function. If you use no second parameter (# of significant digits) then I think you will get the behavior you want.
IDLE output.
>>> round(2.99999999999) 3 >>> round(2.6) 3 >>> round(2.5) 3 >>> round(2.4) 2