What's the f in the print statement do?

Here’s a simple code:

for x in range(100):
    print(f"{x} bottles of beer on the wall!")

In the print statement there’s an f outside the quoted expression. What does it do? What does it mean?

I am just starti ng with Python…

It is a formatted print

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.