f Strings in Python 3.X with Examples | Python Programming for Beginners

Publié le: 26 décembre 2020
sur la chaîne: Data Science Garage
884
18

Python programming language provides many ways how to use strings in print function. For Python beginners, or even experts is worth to know that there are few types of Strings in Python. We can use strings variables with %s mark, either as use format definition, o we can use f strings in our Python projects.

f strings are the most flexible and fastest type among all strings in Python. This experiment based on CPU computation, with wall time test (%%time magic function in Jupyter Notebook).

In this video I demonstrate how f strings differ from classical ones and what you can do with this kind of strings in Python, and how f strings are more usable than others.

The content of the video:
0:00 - Intro (Content)
0:07 - Standard String with %s (not f String)
1:04 - Standard String with Format (not f String)
1:58 - f Strings (Simple Example)
2:49 - f Strings (printing list of tuples in a loop)
4:10 - f Strings (Reserve spaces for variables in text)
5:10 - f Strings (Align variables text by RIGHT side)
5:54 - f Strings (Align multiple variables by LEFT and RIGHT side)
7:16 - Learn More with other print functions in Python
7:50 - Outro.

The link to the bonus video (Learn More part):    • 4 Python Functions That Makes Your Life Ea...   (4 Python Functions That Makes Your Life Easier).

(Sorry, there no audio in this video)
Thank you for watching this video. I hope it was useful. Never Stop Learning!

#pythonprogramming
#fstrings
#pythontips


Sur cette page du site, vous pouvez voir la vidéo en ligne f Strings in Python 3.X with Examples | Python Programming for Beginners durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Data Science Garage 26 décembre 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 884 fois et il a aimé 18 téléspectateurs. Bon visionnage!