Formatting Python Strings

Liam Pulsifer
Liam Pulsifer 7 Lessons 32m basics python

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:

  1. The string .format() method
  2. The formatted string literal, or f-string

What’s Included:

Downloadable Resources:

Related Learning Paths:

About Liam Pulsifer

Liam is a software engineer and avid Pythonista. When he's not writing code to automate all of his daily tasks, you can often find him running, playing basketball and tennis, reading, or eating good food.

» More about Liam

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

Avatar image for jwimmer

jwimmer on April 13, 2022

Awesome veeery handy :) Especially after I tried really hard to find a solution to how to loop through dictionaries and format the output in a tidy way. As a beginner who aspires to become a game developer I discovered my many basic Python knowledge gaps and work now through Real Pythons Basic, which is a fun and way less distressing way than my previous approach of panicking through book chapters which where too demanding because I was too demanding and didn’t know the solution. I will come back to them at a later point. The video tutorials are also very convenient. They show complex concepts and explain the solution in an easy disgestable / understandable way.

← Browse All Courses