Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Cool I’ll try that out with “”” strings which have been coming in handy a lot lately

This is a really good tip, I am just starting to learn some Python. F-strings are going to save me so much time 😬

These remind me of those

`Javascript
multiline ${thingies}`

which are pretty neat. It's nice to see that they are also in Python. Another reason to give it a try, since I've been neglecting it for a while in favour of JS.

Thank you, I try to support specific code examples and technique advice whenever I have voting power to offer. Keep them coming, I will have to give this method of string formatting a try, adding error handling of sorts to the example would be of value, as during runtime I presume errors are likely.

thank you nice blog nice post sharing.

a very great post I really like a friend. please help me friend.

I have no idea what I just read lol but I'll let Frank (@fstmaurice) know about f-strings. He writes code, so he'll understand this language. In my mind, I'm thinking F for Frank, f-strings, fffffff, and then my mind went to farts.

I always knew I was going to be rich. I don't think I ever doubted it for a minute.

Very interesting, very useful ..

Something very useful ..

Why should I be using f strings?
Next time it would be cool if you could show the examples and resulting ouput in the Python 2.7 and 3.6 interpreter shells. Thanks for quick read, I work with Python so this is interesting.

I don’t touch 2.7.

The post is pretty clear of the two advantages.

  1. easier to use and read
  2. faster than format by over 200%

I've just read two of your python posts and learnt something new in both of them! I never even realized you were a programmer! Anyway, thanks for this, I've set a follow on you

I’m not, but I do code. :)

It should be called "string interpolation". Ruby has it, too.

Ha that's awesome, I've been using python 2.6/2.7 mostly due to the version that graphics applications use. So hadn't known about this in python 3.6, that's just lovely :D

A lot of people still use 2.7 but 3 is the way to go. Most everything has been moved over now. I know Google still uses 2.7 a lot but they have a ton of custom systems they need to migrate.