Python String FORMATting using the format function

preview_player
Показать описание
Learn to format strings, integers, floats, and other printed data in Python using the format() function. This tutorial explains how to pass arguments into the format function and how print formatting can be controlled using special characters in a print string.

RELATED VIDEOS:

#Python
Рекомендации по теме
Комментарии
Автор

Really good quality teaching of the .format() function. I had no idea that there was so much more to it than I already knew. I'm looking forward to watching your other videos. Thanks 👍

davidmizzi
Автор

Thanks Joe
I struggled with this function for some time until I came across your video which was nicely paced, with very clear, step-by-step explanations. It now makes sense to me.

harryh
Автор

Thanks Mr. James, the explanation is clear and concise and easy to follow along.

vidsbyom
Автор

few youtuber cover this part in Python, it is not easy though. Thanks very much!

Bo-jljr
Автор

thanks this video helped me a lot,
its simple and straight forward
keep it up

abdullahihthisham
Автор

Thank you very much for this great video! Really learnt a lot :)

tymothylim
Автор

very helpful video thank you very much

abdullahajam
Автор

Super!! Thank you very much!! Some OOP would be great!!!

akiratoriyama
Автор

Thanks Joe this was super fun! I was understanding the first 5 minutes of the video until I got lost. 😂🤣

MauriceWilliams
Автор

Thank you for you share your knowledge .It good for me.

lomanarable
Автор

Are the format for the variables the same for .format and f"" string ?

eatbreathedatascience
Автор

Thanks Joe, you are always great at explaining stuff. What about built-in format function. It's so rare to have it talked about. Can you say something about it. I don't mean the format method that takes the syntax string.format(), I mean the function format(strin, spec)

judeleon
Автор

Sir i have a doubt..for integer and float..without using this (:d) &(:f) i get the same output ..
Example {:>5} instead of {:>5d} & {:>5f}
Gives the same output..
Then why are we using d and f..we can simply use {:>5} right?
Please explain this

simeon
Автор

How to remove 0b from Binary equivalent using format function

aparajitakumari
Автор

GREAT VIDEO. At 15:00 you do an example of unpacking a dictionary. How would you write the same thing using an "f string" rather than writing out .format(**jobs)?? THANK YOU IN ADVANCE

goldensleeves
Автор

Hi Joe! Thanks for this video. Could you tel me something about numbers formating to time with format function, pls. I mean, I have numbers (hours, minutes, seconds) and i would like to format like this "00:00:00". Thanks a lot.

nethsz
Автор

Great course. Thanks Joe, one quick question - why this statement won't work then? >> print('Final scores is {s[-1]}'.format(s=scores))
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
print('Final scores is {s[-1]}'.format(s=scores))
TypeError: list indices must be integers or slices, not str

shiang-pinghao
Автор

Hi sir!
I like your videos.
Do you make a series of python for intermediate learners??

allinoneuniverse
Автор

You didn't do Engineering Notation.

ronalda.saname
Автор

misleading title. This is a METHOD, not a FUNCTION.

secondsight