# from decimal import Decimal, getcontext, ROUND_HALF_UP getcontext().rounding = ROUND_HALF_UP print(round(Decimal("0.5"), 0))