Python has had awesome string formatters for years but the documentation on them is too theoretical and technical. With this site we try to show you the most common use cases covered by old and new style format string APIs with practical examples.
All examples on this page work out of the box in Python 2.7, 3.2, 3.3, 3.4, and 3.5 without requiring additional libraries.
More details about these two formatting methods can be found in the official Python documentation:
- old style
- new style
If you would like to contribute more examples, feel free to make a pull request in Github!