Also called “formatted string literals,” f-strings are ways of formating text so that expressions (like variables) can appear within strings. They have an f at the beginning and curly braces containing expressions that will be replaced with their values.
- Read more about f-strings on Real Python.
- See examples for using f-strings on Geeks for Geeks.