A Guide to the Newer Python String Format Techniques

In the previous tutorial in this introductory series, you learned how to format string data using the string modulo operator. The string modulo operator is useful, and it’s good for you to be familiar with it because you’re likely to encounter it in older Python code. However, there are two newer ways that you can use Python to format strings that are arguably more preferable. In this tutorial, you’ll learn about: The string .format() method The formatted string literal, or f-string You’ll learn about these formatting techniques in detail and…

Read More