The Python String .format() Method

preview_player
Показать описание
In this lesson you will learn the basics of how the string .format() method works. String formatting can interpolate Python values into pre-built strings. This is useful for creating dynamic text—that is, text that responds to the events of the runtime of the Python program.

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

This 6 min video has cleared up SO much for me, and you explained it in such a way that beginners could understand as well. Thank you!

OnaMatsaseng
Автор

I don't understand why is so hard for some people to explain something so clear like you did. Thank you!!!

JMENDOZA
Автор

Thank you for putting this together. Back when I was writing code for dBase II apps, I used a lot of string functions. It will be interesting to see how the 2 compare.

AtlantaTerry
Автор

With the introduction of f-strings, apart from backward compatibility, are there any specific advantages to the string.format() method?

mihird
Автор

Amazing....real python ....real stuff...

osho
Автор

use lebron james or ken thompson for whatever and nba player or language creator for username . don't make people confused for such very trivial examples with using twice username for instance. how it would be when we gonna deal with slightly more complicated abstractions ? nevertheless +1 thumbs up because all the rest is nice

domaincontroller