width = 10 precision = 4 value = decimal.Decimal('12.34567') f'result: {value:{width}.{precision}}'