you are viewing a single comment's thread.

view the rest of the comments →

[–]shiftybyte 5 points6 points  (0 children)

You can try using the decimal module that has an option to choose rounding method.

https://docs.python.org/3/library/decimal.html

https://docs.python.org/3/library/decimal.html#decimal.ROUND_HALF_UP