from decimal import Decimal, ROUND_HALF_UP
origin_num = Decimal('11.245')
answer_num = origin_num.quantize(Decimal('0.00'), rounding=ROUND_HALF_UP)
print(answer_num)
参考链接
https://cloud.tencent.com/developer/article/1416956
https://docs.python.org/3/library/decimal.html#decimal-objects