A Guide to Modern Python String Formatting Tools
Watch Now This tutorial has a related video course created by the Real Python team. Watch it together with the written tutorial to deepen your understanding: Formatting Python Strings
When working with strings in Python, you may need to interpolate values into your string and format these values to create new strings dynamically. In modern Python, you have f-strings and the .format()
method to approach the tasks of interpolating and formatting strings.
To get the most out of this tutorial, you should know the basics of Python programming and the string data type.