How to Code PYTHON: Format String Literals - Manipulate and Format String Data for Display in Python

Опубликовано: 23 September 2020
на канале: Coding With Kids
163
8

Let's get started! 🔥🔥🔥 In this video, we will show you how to write a few PYTHON 🐍 scripts that compare literal strings defined by using single and double quotation marks, use quotes inside other quotes, use escape sequences, use multi-line strings, and format string by using the print() function. In this lesson, you will learn some basics in about 10 minutes!

In this video, you will learn how to :
★ 0:11 Define a literal string with a set of single-quote (') or double-quote (") symbols.
★ 3:08 Use a special character inside a string by adding an escape sequence (a back slash), such as a single-quote escape sequence (\'), double-quote escape sequence (\"), a new line escape sequence (\n), or a tab escape sequence (\t).
★ 7:02 Define a multi-line verbatim string with a set of three single-quote characters (''') or a set of three double-quote characters (""").
★ 9:06 Use different versions of the print() function to concatenate a variable number of strings sent as arguments into the function as well as specifying a character to separate each argument.

Tips and Tricks:
► There is no difference in single or double quoted string. However, we should pick one and use it consistently.
► Be aware of special characters in a string and add a backslash as an escape sequence.
► Use new line and tab escape sequences to format long strings such as introductions and instructions.
► Multi-line verbatim is a type of multi-line string that retains the formatting as typed.
► Keep your code clean when concatenating strings by using the built-in feature of the print() function.

WANT MORE PYTHON TUTORIALS?
🐍 Python Coding for Beginners:
   • 🐍 Python Coding for Beginners  

For the setup, please read the followings before you begin:
1. Download latest Python: https://www.python.org/downloads/
2. Install Python and remember to select "Add Python... to PATH" when asked.
3. Download and install latest Visual Studio Code: https://code.visualstudio.com/Download
4. Install the Python extension for Visual Studio Code: Go to View and select Extensions, or select the Extensions icon, then search for python.

Python - a programming language used by world-class companies such as Amazon.com, Alphabet (Google), Facebook, Twitter, and NASA.

👇 SUBSCRIBE TO CODING WITH KIDS 👨🏻‍💻👩🏻‍💻 YOUTUBE CHANNEL NOW 👇
   / @codingwithkids  

#CodingWithKids #PythonProgramming #PythonForBeginners


На этой странице сайта вы можете посмотреть видео онлайн How to Code PYTHON: Format String Literals - Manipulate and Format String Data for Display in Python длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Coding With Kids 23 September 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 163 раз и оно понравилось 8 зрителям. Приятного просмотра!