format_result()
Format a numeric result as a string.
Usage
format_result(
value,
precision=2,
)Parameters
value: float-
The value to format.
precision: int = 2-
The number of decimal places, by default 2.
Returns
str-
The formatted string representation.
Examples
>>> format_result(3.14159, precision=3)
'3.142'