Formatting Python Strings (Overview)
In this course, you’ll see two items to add to your Python string formatting toolkit. You’ll learn about Python’s string format method and the formatted string literal, or f-string. You’ll learn about these formatting techniques in detail and add them to your Python string formatting toolkit.
In this course, you’ll learn about:
- The string
.format()
method - The formatted string literal, or f-string
00:00
Hi, and welcome to this Real Python video tutorial course on modern string formatting techniques in Python. In this course, I’ll show you two different techniques for formatting strings in Python: the string .format()
method and the formatted string literal, or f-string.
00:17 Both of these are really powerful and flexible techniques that share some syntax and some terminology. After you finish this course, you’ll be able to print out informative, dynamic messages to your users, make nicely formatted tables, and do pretty much anything else that you can do with strings—which as you might’ve guessed is a lot.
00:39
Let’s get started and talk about the string .format()
method.
Become a Member to join the conversation.