Cool, and good to know. Good presentation. I'm still going to continue to use .format as I like to keep data/contents separate from presentation like CSS offers in Web development. _print( "Presentation and {}".format( "data/contents.") )_
@NERDfirst3 жыл бұрын
Hello and thank you for your comment! Yeah for sure! I realized .format() allows you to construct your templates beforehand, store it in a variable then call .format() on it later as well, which is something I don't think you can do with this method. So .format() stays in our Python arsenal =)
@jay-rathod-013 жыл бұрын
Bro that's cool tutorial and cool channel name.
@NERDfirst3 жыл бұрын
Hello and thank you for your comment! Glad you liked the video =)
@sashikiran93 жыл бұрын
Thank you for the content. Do you need to import any library to use f strings or is it inbuilt ?
@NERDfirst3 жыл бұрын
Hello and thank you for your comment! This is in-built, no import required, as long as you're using Python 3.6 or newer.
@rasseru_sama21183 жыл бұрын
Keep it up dude 🥳🥳
@NERDfirst3 жыл бұрын
Hello and thank you very much for your comment and support! Glad you like my work =)
@mamazu19953 жыл бұрын
Very good video explaining the topic. I think every programming language should have some form of string interpolation. But you also added a little mistake in the video. You said "You can put any statement in here". Examples for statements are: if statements or while statements. Those things don't have a value where on the other hand "expressions" like x*2 or list (comprehension) expressions have a value. It's a minor knit pick and it was obvious what what you meant but just wanted to get the terminology correct.
@NERDfirst3 жыл бұрын
Hello and thank you for your comment! Very good point, yes. I suppose it'd be more accurate to say that all expressions can be represented in the f-strings. Luckily a lot of things in Python have one-liner representations - Ternary operators, comprehensions and lambdas come to mind. Also, thanks for introducing me to the term "string interpolation"! Would've been a lot less clunky than how I said it in the video =)