r/Python • • Sep 10 '19

Found this on twitter

Post image
2.9k Upvotes

185 comments sorted by

View all comments

126

u/Jim_Panzee Sep 10 '19

f-strings are sooo much better.

8

u/Gammaliel Sep 10 '19

Why are they better than the good ol' .format()? I've heard quite a lot of people raving about how good fstrings are but I never undestood it.

13

u/is_a_act Sep 10 '19

Readability - I'm not sure if they're faster, though I remember seeing that they're supposed to be?

4

u/[deleted] Sep 10 '19

They are indeed faster: https://realpython.com/python-f-strings/#speed

Hadn't heard of f-strings before, but i will definitely be using them in the future.