String formatting is important when you want to build new strings that are using existing values. Python provides several ways to format text strings. The most popular of these are formatted string, the str.format() method, and % formatting. Now these 3 ways of formatting a string will help us write the best user friendly message in our programs. This tutorials also cover number formatting as well, how to format float to integer, to percentage and how to round of float values to an integer. knowing these best practices will help you clean and error free code, with that you will become a pythonista. happy coding.
CHANNEL LINK - / @dky_code
MAIN VIDEO LINK
youtube video - • 3 BEST way to format string in python | P...
SIMILAR VIDEOS ON THE BUILT-IN FUNCTIONS
while loop - • while loop in python - how to use and work...
github repo - https://github.com/Dicksonyankey/YouT...
VIDEO CHAPTERS
0:00 - Intro
1:12 - using f-string to format a string
5:03 - using the str.format() to format a string
7:12 - using the % format to format a string
9:50 - using the str concatenation method
12:10 - Formatting numbers in python
13:08 - formatting floating numbers as integers
15:38 - rounding float number
17:14 - expressing percentage
19:25 - padding left, right and center
HAPPY CODING
▶️ You Can Find Me On:
linkedIn - / dickson-kwasi-. .
Instagram - / dky_code
TikTok - / dky_code
На этой странице сайта вы можете посмотреть видео онлайн 3 BEST way to format string in python | Python Beginner Tutorials длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь DKY CODE 08 Февраль 2023, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 123 раз и оно понравилось 15 зрителям. Приятного просмотра!