locale.format(format, val, grouping=False, monetary=False)
Formats a number val according to the current LC_NUMERIC
setting. The format follows the conventions of the %
operator. For floating point values, the decimal point is modified if appropriate. If grouping is true, also takes the grouping into account.
If monetary is true, the conversion uses monetary thousands separator and grouping strings.
Please note that this function will only work for exactly one %char specifier. For whole format strings, use format_string()
.
Please login to continue.