PyDocs

Nav

Internationalization

format_string

locale

function (source)
  • format_string(format, val, grouping=False, monetary=False)
Formats a string in the same way that the % formatting would use,
but takes the current locale into account.

Grouping is applied if the third parameter is true.
Conversion uses monetary thousands separator and grouping strings if
fourth parameter monetary is true.
Changed in 3.7
  • 3.7: The monetary keyword parameter was added.
0 Examples
No examples for locale/format_string.
See Also
No see-alsos for locale/format_string
0 Notes
No notes for format_string