Python 3.7: Format String Method

preview_player
Показать описание

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

comment1 = "Myers Tom, Thank you for such a {} and {} tutorial!".format("clear", "concise")

comment2 = "I like that you show {0} methods for handling {1} formatting in {2}".format("three", "string", "python")

comment3 = "I think I will give these {first_noun} a try {first_adverb}".format(first_noun="methods", first_adverb = "now")

austing
Автор

Thank you so much, this is an extremely short and precise tutorial! :D

ypng
Автор

Thaaaank you! Trying to learn this on my own and the program I'm using just blew through the keyword part of .format() without fully explaining it.
They also didn't mention the tuple/dictionary thing, that's interesting.

thegovernmentusa
Автор

3:07 when you're trying to avoid demonetization

elkenbuild
Автор

But why can i not set the first and lastname as a variable (string) at the beginning and just write
print("My Name is" +first_name+lastname)?

bjornotto
Автор

Muh se supari nikal ke padhao re guruji

mukulverma