How to Use F-Strings for String Formatting in Python

preview_player
Показать описание
Learn about what Python’s formatted string literals (f-strings) are and when to use them. You’ll see that f-strings allow you to use embedded Python expressions inside string constants.

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

I am learning python and I really don't understand the point of an f str. You can change regular strings whenever

WhiteoutMonster
Автор

This is a great example of how to do it, however like in every single tech bro video, you didn't explain why it is done, what's the purpose of it.

MM-oqlb
Автор

F-strings are used for string interpolation, making it easier and more readable to embed variables and expressions within strings. They improve code readability and reduce the need for concatenation or complex formatting functions.
(Chatgpt)

moviesync
Автор

This sound is familiar i think Khan academy

kidus