Decimal(str(n)).quantize(Decimal('0.1'),ROUND_HALF_UP) #小数第2位で四捨五入 Decimal(str(n)).quantize(Decimal('0.01'),ROUND_HALF_UP) #小数第3位で四捨 ...