If you wanted something helpful for working with big numbers, you can use underscores within the integers. It won't be printed though! x = 2 * 10_000_000 print(x)
you went through documentation. however most annoying thing in f string is missing normal formatting big numbers with SPACE as separator independenly of region.
f-strings are good, but using % or .format() still have their uses. f-strings can only be used when the values to be inserted are known at the place of specifying the format. But sometimes you want to pass a format to a function that will fill in the values. I did this when producing sequences of images and had some generic method that got a scene and saved images 000.png, ..., 399.png under some path. The path was then specified as "somepath/%03d.png".
it's probably controversial but you can print straight to a file. I've been known to take a lazy shortcut and use f strings to format output to look like a csv, and print it to a file... i wouldnt do this for lots of data though.... there are much better ways
The comma for big numbers is a great tip.
If you wanted something helpful for working with big numbers, you can use underscores within the integers. It won't be printed though!
x = 2 * 10_000_000
print(x)
Thanks, I never knew about the x= trick to show the variable and value of it!
Tim thanks for all the content you deliver. I benefit very much from your work
Very useful thanks for giving the source to read more ❤
tim has done it again love the devotion and intuition man 😊😊
Thanks a lot for this video!
That helped me a lot!
@1:30.... its not " 2 significant digits " 2 significant digits for that particular number will be 1200
the E string is usually the first string to do :-) --guitar picker folklore
Thank you
useful ❤❤
you went through documentation. however most annoying thing in f string is missing normal formatting big numbers with SPACE as separator independenly of region.
Did not know about the = sign option
Danke!
could you make video compare between Django and node.js. pls😊
tim no way you use zsh as well, ALL HAIL THE ZSH!!!
f-strings are good, but using % or .format() still have their uses.
f-strings can only be used when the values to be inserted are known at the place of specifying the format.
But sometimes you want to pass a format to a function that will fill in the values. I did this when producing sequences of images and had some generic method that got a scene and saved images 000.png, ..., 399.png under some path. The path was then specified as "somepath/%03d.png".
it's probably controversial but you can print straight to a file. I've been known to take a lazy shortcut and use f strings to format output to look like a csv, and print it to a file...
i wouldnt do this for lots of data though.... there are much better ways
❤❤❤
Hello!!
I already 3 years ago coding python 😂
what are strings
Strings are the smallest subatomic form
wow
Am I mistaken or didn't the hat use to be a carrot?
Why don't you host a gamejam?
Oh aloice will never accept Tobe 30 years old
Nice, but as always python goes too far with f strings.
What constitutes “too far”.
Apologies, but that seems like a really daft take on a useful language improvement 🫤
What’s WRONG with it?
@@portlyoldman too far means mooore and mooore than otherw