r/ProgrammerHumor • • Aug 26 '20

Python goes brrrr

Post image
59.2k Upvotes

789 comments sorted by

View all comments

Show parent comments

2

u/BirkTheBrick Aug 26 '20

...please teach an educated swine who still does that? Lmao

4

u/jad2192 Aug 27 '20

With f-strings you can directly sub in variables without needing to declare the type. My above silly example would become f'{x}{y}' which doesn't seem much simpler but as the string to format gets more complicated it's nice not having keep track of the order of the variables at the end. In my job as a data scientist this made writing dynamic SQL queries for pipelines and dashboards SO much easier. Here is an article with a good run down