Learn how to use Python's format mini-language to format strings. Topics include aligning and filling textual output, converting between data types, and formatting numeric values.

19m read timeFrom realpython.com
Post cover image
Table of contents
Using String Interpolation and Replacement FieldsUnderstanding the Python Format Mini-LanguageAligning and Filling the OutputConverting Between Type RepresentationsFormatting Numeric Values to Improve PresentationProviding Formatting Fields DynamicallyFormatting Strings: Practical ExamplesExploring Other Options in the Mini-LanguageConclusion

Sort: