Python's f-strings! - Friday Minis 317

  Рет қаралды 775

0612 TV w/ NERDfirst

0612 TV w/ NERDfirst

Күн бұрын

Пікірлер: 10
@k.chriscaldwell4141
@k.chriscaldwell4141 3 жыл бұрын
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.") )_
@NERDfirst
@NERDfirst 3 жыл бұрын
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-01
@jay-rathod-01 3 жыл бұрын
Bro that's cool tutorial and cool channel name.
@NERDfirst
@NERDfirst 3 жыл бұрын
Hello and thank you for your comment! Glad you liked the video =)
@sashikiran9
@sashikiran9 3 жыл бұрын
Thank you for the content. Do you need to import any library to use f strings or is it inbuilt ?
@NERDfirst
@NERDfirst 3 жыл бұрын
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_sama2118
@rasseru_sama2118 3 жыл бұрын
Keep it up dude 🥳🥳
@NERDfirst
@NERDfirst 3 жыл бұрын
Hello and thank you very much for your comment and support! Glad you like my work =)
@mamazu1995
@mamazu1995 3 жыл бұрын
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.
@NERDfirst
@NERDfirst 3 жыл бұрын
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 =)
Random Shuffling isn't Easy! - Friday Minis 316
8:29
0612 TV w/ NERDfirst
Рет қаралды 983
Quick Intro to F-Strings in Python for String Formatting
4:28
Pretty Printed
Рет қаралды 39 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
Python laid waste to my C++!
17:18
Sheafification of G
Рет қаралды 186 М.
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 821 М.
why are switch statements so HECKIN fast?
11:03
Low Level
Рет қаралды 437 М.
threading vs multiprocessing in python
22:31
Dave's Space
Рет қаралды 601 М.
Use Arc Instead of Vec
15:21
Logan Smith
Рет қаралды 158 М.
CPU Pipelining - The cool way your CPU avoids idle time!
15:25
0612 TV w/ NERDfirst
Рет қаралды 12 М.
Programming Is NOT Enough | Add these 7 skills…
13:19
Travis Media
Рет қаралды 423 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН