An Introduction to f-strings in Python 3
Python supports multiple ways of formatting strings, but Python 3.6 (PEP 498) introduced a new, concise way to embed expressions inside of strings literals. The feature is called f-strings, which stands for "formatted string literals".
The goal of the f-string syntax is to provide a concise way to embed Python expressions inside of a string literal. These expressions are not fixed values, but rather evaluated at runtime.
In this guide, we'll learn how to use f-strings.