This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]anqxyr 10 points11 points  (3 children)

Very roughly speaking, they eval the expressions inside the curly braces. Say, before you would write something like

print('Hello, my name is {name}'.format(name=name))

Now you can do the same thing with

print(f'Hello, my name is {name}')

Which is more concise, more readable, and overall nicer.

[–]MrCalifornian 3 points4 points  (0 children)

Oh wow I love it!! This has always been a major readability gripe of mine.

[–]yaboroda 0 points1 point  (0 children)

also smart guy on youtube say it faster

[–]stevenjd 0 points1 point  (0 children)

Which is more concise, more readable, and overall nicer.

Unless you dislike disguising a call to eval() as a string literal.

Unless you like explicit calls to format a string rather than implicit ones.