Python Text

The F String is very versatile in Python:

Explanation:

Previously, we had a text string, some commas and a variable, and another text string to print a variable. Now, we will put everything in one line of quotes, and the {burgers_ordered} variable in the middle. If we have a text string in Python, and we append the letter “f” at the front of it, then any variable with the braces inside of that string will not print the variable word, but rather the value that the variable contains — so that’s why 25 is printed above. These f strings can make life very simple down the line and your code easier to work with.